diff options
author | Antoine Tenart <antoine.tenart@free-electrons.com> | 2014-09-24 23:05:50 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-29 11:52:59 -0400 |
commit | 3d46e73dfdb840f460e5b06416965d132570ec33 (patch) | |
tree | 65d51ef3123588de224bc928b6afc5af39879196 /drivers/usb/core | |
parent | a173dc447d2980bb7cb9618a6b59cf135ea01e80 (diff) | |
download | blackbird-obmc-linux-3d46e73dfdb840f460e5b06416965d132570ec33.tar.gz blackbird-obmc-linux-3d46e73dfdb840f460e5b06416965d132570ec33.zip |
usb: rename phy to usb_phy in HCD
The USB PHY member of the HCD structure is renamed to 'usb_phy' and
modifications are done in all drivers accessing it.
This is in preparation to adding the generic PHY support.
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
[Sergei: added missing 'drivers/usb/misc/lvstest.c' file, resolved rejects,
updated changelog.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hcd.c | 20 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index bcb96ff207ba..2c56252b9ff8 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2629,7 +2629,7 @@ int usb_add_hcd(struct usb_hcd *hcd, int retval; struct usb_device *rhdev; - if (IS_ENABLED(CONFIG_USB_PHY) && !hcd->phy) { + if (IS_ENABLED(CONFIG_USB_PHY) && !hcd->usb_phy) { struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, 0); if (IS_ERR(phy)) { @@ -2642,7 +2642,7 @@ int usb_add_hcd(struct usb_hcd *hcd, usb_put_phy(phy); return retval; } - hcd->phy = phy; + hcd->usb_phy = phy; hcd->remove_phy = 1; } } @@ -2790,10 +2790,10 @@ err_allocate_root_hub: err_register_bus: hcd_buffer_destroy(hcd); err_remove_phy: - if (hcd->remove_phy && hcd->phy) { - usb_phy_shutdown(hcd->phy); - usb_put_phy(hcd->phy); - hcd->phy = NULL; + if (hcd->remove_phy && hcd->usb_phy) { + usb_phy_shutdown(hcd->usb_phy); + usb_put_phy(hcd->usb_phy); + hcd->usb_phy = NULL; } return retval; } @@ -2866,10 +2866,10 @@ void usb_remove_hcd(struct usb_hcd *hcd) usb_deregister_bus(&hcd->self); hcd_buffer_destroy(hcd); - if (hcd->remove_phy && hcd->phy) { - usb_phy_shutdown(hcd->phy); - usb_put_phy(hcd->phy); - hcd->phy = NULL; + if (hcd->remove_phy && hcd->usb_phy) { + usb_phy_shutdown(hcd->usb_phy); + usb_put_phy(hcd->usb_phy); + hcd->usb_phy = NULL; } usb_put_invalidate_rhdev(hcd); diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 1d21b2c21f9b..11e80ac31324 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4468,8 +4468,8 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, if (retval) goto fail; - if (hcd->phy && !hdev->parent) - usb_phy_notify_connect(hcd->phy, udev->speed); + if (hcd->usb_phy && !hdev->parent) + usb_phy_notify_connect(hcd->usb_phy, udev->speed); /* * Some superspeed devices have finished the link training process @@ -4627,9 +4627,9 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, /* Disconnect any existing devices under this port */ if (udev) { - if (hcd->phy && !hdev->parent && + if (hcd->usb_phy && !hdev->parent && !(portstatus & USB_PORT_STAT_CONNECTION)) - usb_phy_notify_disconnect(hcd->phy, udev->speed); + usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); usb_disconnect(&port_dev->child); } |