From dfdc6e12c8a3b1bc0c123abeb3679208b31a19f6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 14 Oct 2015 11:20:00 -0700 Subject: [PATCH] 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 Reviewed-by: Alex Elder --- drivers/staging/greybus/usb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/greybus/usb.c b/drivers/staging/greybus/usb.c index 2133d0d..6647868 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; } -- 2.7.4