greybus: drop hd arg from submit_gbuf method

Every gbuf is associated with a connection when it is created.  And
a connection contains a pointer to the host device that will carry
messages.  So there's no need for the submit_gbuf() method to have
the host device pointer passed to it, the function can get it from
the gbuf's connection.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Alex Elder 2014-10-16 06:35:29 -05:00 committed by Greg Kroah-Hartman
parent a7901d5ef7
commit 61418b9fd9
3 changed files with 4 additions and 5 deletions

View File

@ -206,9 +206,9 @@ static struct urb *next_free_urb(struct es1_ap_dev *es1, gfp_t gfp_mask)
return urb; return urb;
} }
static int submit_gbuf(struct gbuf *gbuf, struct greybus_host_device *hd, static int submit_gbuf(struct gbuf *gbuf, gfp_t gfp_mask)
gfp_t gfp_mask)
{ {
struct greybus_host_device *hd = gbuf->connection->hd;
struct es1_ap_dev *es1 = hd_to_es1(hd); struct es1_ap_dev *es1 = hd_to_es1(hd);
struct usb_device *udev = es1->usb_dev; struct usb_device *udev = es1->usb_dev;
int retval; int retval;

View File

@ -105,7 +105,7 @@ int greybus_submit_gbuf(struct gbuf *gbuf, gfp_t gfp_mask)
{ {
struct greybus_host_device *hd = gbuf->connection->hd; struct greybus_host_device *hd = gbuf->connection->hd;
return hd->driver->submit_gbuf(gbuf, hd, gfp_mask); return hd->driver->submit_gbuf(gbuf, gfp_mask);
} }
int greybus_kill_gbuf(struct gbuf *gbuf) int greybus_kill_gbuf(struct gbuf *gbuf)

View File

@ -169,8 +169,7 @@ struct greybus_host_driver {
void (*free_gbuf_data)(struct gbuf *gbuf); void (*free_gbuf_data)(struct gbuf *gbuf);
int (*submit_svc)(struct svc_msg *svc_msg, int (*submit_svc)(struct svc_msg *svc_msg,
struct greybus_host_device *hd); struct greybus_host_device *hd);
int (*submit_gbuf)(struct gbuf *gbuf, struct greybus_host_device *hd, int (*submit_gbuf)(struct gbuf *gbuf, gfp_t gfp_mask);
gfp_t gfp_mask);
}; };
struct greybus_host_device { struct greybus_host_device {