Commit dfdc6e12 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: usb: use the bundle struct device instead of the connector

We are removing struct device from the gb_connection structure in the
near future.  The gb_bundle structure's struct device should be used as
a replacement.

This patch moves the usb driver to use the bundle pointer instead of the
connection pointer.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
parent 61c80575
...@@ -57,7 +57,8 @@ static void hcd_stop(struct usb_hcd *hcd) ...@@ -57,7 +57,8 @@ static void hcd_stop(struct usb_hcd *hcd)
ret = gb_operation_sync(dev->connection, GB_USB_TYPE_HCD_STOP, ret = gb_operation_sync(dev->connection, GB_USB_TYPE_HCD_STOP,
NULL, 0, NULL, 0); NULL, 0, NULL, 0);
if (ret) if (ret)
dev_err(&dev->connection->dev, "HCD stop failed '%d'\n", ret); dev_err(&dev->connection->bundle->dev,
"HCD stop failed '%d'\n", ret);
} }
static int hcd_start(struct usb_hcd *hcd) static int hcd_start(struct usb_hcd *hcd)
...@@ -69,7 +70,8 @@ static int hcd_start(struct usb_hcd *hcd) ...@@ -69,7 +70,8 @@ static int hcd_start(struct usb_hcd *hcd)
ret = gb_operation_sync(dev->connection, GB_USB_TYPE_HCD_START, ret = gb_operation_sync(dev->connection, GB_USB_TYPE_HCD_START,
NULL, 0, NULL, 0); NULL, 0, NULL, 0);
if (ret) { if (ret) {
dev_err(&dev->connection->dev, "HCD start failed '%d'\n", ret); dev_err(&dev->connection->bundle->dev,
"HCD start failed '%d'\n", ret);
return ret; return ret;
} }
...@@ -161,7 +163,7 @@ static struct hc_driver usb_gb_hc_driver = { ...@@ -161,7 +163,7 @@ static struct hc_driver usb_gb_hc_driver = {
static int gb_usb_connection_init(struct gb_connection *connection) static int gb_usb_connection_init(struct gb_connection *connection)
{ {
struct device *dev = &connection->dev; struct device *dev = &connection->bundle->dev;
struct gb_usb_device *gb_usb_dev; struct gb_usb_device *gb_usb_dev;
struct usb_hcd *hcd; struct usb_hcd *hcd;
...@@ -184,7 +186,7 @@ static int gb_usb_connection_init(struct gb_connection *connection) ...@@ -184,7 +186,7 @@ static int gb_usb_connection_init(struct gb_connection *connection)
* Disable for now. * Disable for now.
*/ */
if (1) { if (1) {
dev_warn(&connection->dev, "USB protocol disabled\n"); dev_warn(dev, "USB protocol disabled\n");
retval = -EPROTONOSUPPORT; retval = -EPROTONOSUPPORT;
goto err_put_hcd; goto err_put_hcd;
} }
......
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