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>
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;
{
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)
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 {