Commit 61418b9f authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

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: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent a7901d5e
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment