diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2015-10-14 11:20:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-10-15 09:19:15 -0700 |
commit | dfdc6e12c8a3b1bc0c123abeb3679208b31a19f6 (patch) | |
tree | 8a741331c232adaad8bdc211172b752075e0ea13 /drivers/staging/greybus/usb.c | |
parent | 61c80575b90797bb3e74e2e2510eaa376bc8e4cb (diff) | |
download | linux-dfdc6e12c8a3b1bc0c123abeb3679208b31a19f6.tar.bz2 |
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: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/usb.c')
-rw-r--r-- | drivers/staging/greybus/usb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/greybus/usb.c b/drivers/staging/greybus/usb.c index 2133d0d25f25..6647868b4960 100644 --- a/drivers/staging/greybus/usb.c +++ b/drivers/staging/greybus/usb.c @@ -57,7 +57,8 @@ static void hcd_stop(struct usb_hcd *hcd) ret = gb_operation_sync(dev->connection, GB_USB_TYPE_HCD_STOP, NULL, 0, NULL, 0); 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) @@ -69,7 +70,8 @@ static int hcd_start(struct usb_hcd *hcd) ret = gb_operation_sync(dev->connection, GB_USB_TYPE_HCD_START, NULL, 0, NULL, 0); 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; } @@ -161,7 +163,7 @@ static struct hc_driver usb_gb_hc_driver = { 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 usb_hcd *hcd; @@ -184,7 +186,7 @@ static int gb_usb_connection_init(struct gb_connection *connection) * Disable for now. */ if (1) { - dev_warn(&connection->dev, "USB protocol disabled\n"); + dev_warn(dev, "USB protocol disabled\n"); retval = -EPROTONOSUPPORT; goto err_put_hcd; } |