diff options
author | Antoine Tenart <antoine.tenart@free-electrons.com> | 2014-09-24 15: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) |
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, | |||
2629 | int retval; | 2629 | int retval; |
2630 | struct usb_device *rhdev; | 2630 | struct usb_device *rhdev; |
2631 | 2631 | ||
2632 | if (IS_ENABLED(CONFIG_USB_PHY) && !hcd->phy) { | 2632 | if (IS_ENABLED(CONFIG_USB_PHY) && !hcd->usb_phy) { |
2633 | struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, 0); | 2633 | struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, 0); |
2634 | 2634 | ||
2635 | if (IS_ERR(phy)) { | 2635 | if (IS_ERR(phy)) { |
@@ -2642,7 +2642,7 @@ int usb_add_hcd(struct usb_hcd *hcd, | |||
2642 | usb_put_phy(phy); | 2642 | usb_put_phy(phy); |
2643 | return retval; | 2643 | return retval; |
2644 | } | 2644 | } |
2645 | hcd->phy = phy; | 2645 | hcd->usb_phy = phy; |
2646 | hcd->remove_phy = 1; | 2646 | hcd->remove_phy = 1; |
2647 | } | 2647 | } |
2648 | } | 2648 | } |
@@ -2790,10 +2790,10 @@ err_allocate_root_hub: | |||
2790 | err_register_bus: | 2790 | err_register_bus: |
2791 | hcd_buffer_destroy(hcd); | 2791 | hcd_buffer_destroy(hcd); |
2792 | err_remove_phy: | 2792 | err_remove_phy: |
2793 | if (hcd->remove_phy && hcd->phy) { | 2793 | if (hcd->remove_phy && hcd->usb_phy) { |
2794 | usb_phy_shutdown(hcd->phy); | 2794 | usb_phy_shutdown(hcd->usb_phy); |
2795 | usb_put_phy(hcd->phy); | 2795 | usb_put_phy(hcd->usb_phy); |
2796 | hcd->phy = NULL; | 2796 | hcd->usb_phy = NULL; |
2797 | } | 2797 | } |
2798 | return retval; | 2798 | return retval; |
2799 | } | 2799 | } |
@@ -2866,10 +2866,10 @@ void usb_remove_hcd(struct usb_hcd *hcd) | |||
2866 | 2866 | ||
2867 | usb_deregister_bus(&hcd->self); | 2867 | usb_deregister_bus(&hcd->self); |
2868 | hcd_buffer_destroy(hcd); | 2868 | hcd_buffer_destroy(hcd); |
2869 | if (hcd->remove_phy && hcd->phy) { | 2869 | if (hcd->remove_phy && hcd->usb_phy) { |
2870 | usb_phy_shutdown(hcd->phy); | 2870 | usb_phy_shutdown(hcd->usb_phy); |
2871 | usb_put_phy(hcd->phy); | 2871 | usb_put_phy(hcd->usb_phy); |
2872 | hcd->phy = NULL; | 2872 | hcd->usb_phy = NULL; |
2873 | } | 2873 | } |
2874 | 2874 | ||
2875 | usb_put_invalidate_rhdev(hcd); | 2875 | 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, | |||
4468 | if (retval) | 4468 | if (retval) |
4469 | goto fail; | 4469 | goto fail; |
4470 | 4470 | ||
4471 | if (hcd->phy && !hdev->parent) | 4471 | if (hcd->usb_phy && !hdev->parent) |
4472 | usb_phy_notify_connect(hcd->phy, udev->speed); | 4472 | usb_phy_notify_connect(hcd->usb_phy, udev->speed); |
4473 | 4473 | ||
4474 | /* | 4474 | /* |
4475 | * Some superspeed devices have finished the link training process | 4475 | * 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, | |||
4627 | 4627 | ||
4628 | /* Disconnect any existing devices under this port */ | 4628 | /* Disconnect any existing devices under this port */ |
4629 | if (udev) { | 4629 | if (udev) { |
4630 | if (hcd->phy && !hdev->parent && | 4630 | if (hcd->usb_phy && !hdev->parent && |
4631 | !(portstatus & USB_PORT_STAT_CONNECTION)) | 4631 | !(portstatus & USB_PORT_STAT_CONNECTION)) |
4632 | usb_phy_notify_disconnect(hcd->phy, udev->speed); | 4632 | usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); |
4633 | usb_disconnect(&port_dev->child); | 4633 | usb_disconnect(&port_dev->child); |
4634 | } | 4634 | } |
4635 | 4635 | ||