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:
parent
a7901d5ef7
commit
61418b9fd9
|
@ -206,9 +206,9 @@ static struct urb *next_free_urb(struct es1_ap_dev *es1, gfp_t gfp_mask)
|
|||
return urb;
|
||||
}
|
||||
|
||||
static int submit_gbuf(struct gbuf *gbuf, struct greybus_host_device *hd,
|
||||
gfp_t gfp_mask)
|
||||
static int submit_gbuf(struct gbuf *gbuf, gfp_t gfp_mask)
|
||||
{
|
||||
struct greybus_host_device *hd = gbuf->connection->hd;
|
||||
struct es1_ap_dev *es1 = hd_to_es1(hd);
|
||||
struct usb_device *udev = es1->usb_dev;
|
||||
int retval;
|
||||
|
|
|
@ -105,7 +105,7 @@ int greybus_submit_gbuf(struct gbuf *gbuf, gfp_t gfp_mask)
|
|||
{
|
||||
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)
|
||||
|
|
|
@ -169,8 +169,7 @@ struct greybus_host_driver {
|
|||
void (*free_gbuf_data)(struct gbuf *gbuf);
|
||||
int (*submit_svc)(struct svc_msg *svc_msg,
|
||||
struct greybus_host_device *hd);
|
||||
int (*submit_gbuf)(struct gbuf *gbuf, struct greybus_host_device *hd,
|
||||
gfp_t gfp_mask);
|
||||
int (*submit_gbuf)(struct gbuf *gbuf, gfp_t gfp_mask);
|
||||
};
|
||||
|
||||
struct greybus_host_device {
|
||||
|
|
Loading…
Reference in New Issue