Commit 6910fa2d authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: hd: add flag argument to cport_enable callback

Add a flag argument to the host-device cport_enable callback that can be
used to provide hints about the connection being created (e.g.
connection priority).
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent caad3090
......@@ -286,7 +286,8 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection)
if (!hd->driver->cport_enable)
return 0;
ret = hd->driver->cport_enable(hd, connection->hd_cport_id);
ret = hd->driver->cport_enable(hd, connection->hd_cport_id,
connection->flags);
if (ret) {
dev_err(&hd->dev, "%s: failed to enable host cport: %d\n",
connection->name, ret);
......
......@@ -19,7 +19,8 @@ struct gb_hd_driver {
int (*cport_allocate)(struct gb_host_device *hd, int cport_id,
unsigned long flags);
void (*cport_release)(struct gb_host_device *hd, u16 cport_id);
int (*cport_enable)(struct gb_host_device *hd, u16 cport_id);
int (*cport_enable)(struct gb_host_device *hd, u16 cport_id,
unsigned long flags);
int (*cport_disable)(struct gb_host_device *hd, u16 cport_id);
int (*cport_flush)(struct gb_host_device *hd, u16 cport_id);
int (*cport_ping)(struct gb_host_device *hd, u16 cport_id);
......
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