aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hcd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-14 17:57:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-14 17:57:16 -0500
commite7cf773d431a63a2417902696fcc9e0ebdc83bbe (patch)
tree86dbdceb7d91226507a3af0d57e03b0ca664b22e /drivers/usb/core/hcd.c
parent7a02d089695a1217992434f03a78aa32bad85b5c (diff)
parent81e1dadfb5b2d47aa513ad60b1c9cf0ea17b6514 (diff)
Merge tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH: "Here's the big set of USB and PHY patches for 3.19-rc1. The normal churn in the USB gadget area is in here, as well as xhci and other individual USB driver updates. The PHY tree is also in here, as there were dependancies on the USB tree. All of these have been in linux-next" * tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (351 commits) arm: omap3: twl: remove usb phy init data usbip: fix error handling in stub_probe() usb: gadget: udc: missing curly braces USB: mos7720: delete some unneeded code wusb: replace memset by memzero_explicit usbip: remove unneeded structure usb: xhci: fix comment for PORT_DEV_REMOVE xhci: don't use the same variable for stopped and halted rings current TD xhci: clear extra bits from slot context when setting max exit latency xhci: cleanup finish_td function USB: adutux: NULL dereferences on disconnect usb: chipidea: fix platform_no_drv_owner.cocci warnings usb: chipidea: Fixed a few typos in comments Documentation: bindings: add doc for the USB2 ChipIdea USB driver usb: chipidea: add a usb2 driver for ci13xxx usb: chipidea: fix phy handling usb: chipidea: remove duplicate dev_set_drvdata for host_start usb: chipidea: parameter 'mode' isn't needed for hw_device_reset usb: chipidea: add controller reset API usb: chipidea: remove flag CI_HDRC_REQUIRE_TRANSCEIVER ...
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r--drivers/usb/core/hcd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 278be0515e8e..11cee55ae397 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2646,7 +2646,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
2646 } 2646 }
2647 } 2647 }
2648 2648
2649 if (IS_ENABLED(CONFIG_GENERIC_PHY)) { 2649 if (IS_ENABLED(CONFIG_GENERIC_PHY) && !hcd->phy) {
2650 struct phy *phy = phy_get(hcd->self.controller, "usb"); 2650 struct phy *phy = phy_get(hcd->self.controller, "usb");
2651 2651
2652 if (IS_ERR(phy)) { 2652 if (IS_ERR(phy)) {
@@ -2666,6 +2666,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
2666 goto err_phy; 2666 goto err_phy;
2667 } 2667 }
2668 hcd->phy = phy; 2668 hcd->phy = phy;
2669 hcd->remove_phy = 1;
2669 } 2670 }
2670 } 2671 }
2671 2672
@@ -2812,7 +2813,7 @@ err_allocate_root_hub:
2812err_register_bus: 2813err_register_bus:
2813 hcd_buffer_destroy(hcd); 2814 hcd_buffer_destroy(hcd);
2814err_create_buf: 2815err_create_buf:
2815 if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->phy) { 2816 if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->remove_phy && hcd->phy) {
2816 phy_power_off(hcd->phy); 2817 phy_power_off(hcd->phy);
2817 phy_exit(hcd->phy); 2818 phy_exit(hcd->phy);
2818 phy_put(hcd->phy); 2819 phy_put(hcd->phy);
@@ -2896,7 +2897,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
2896 usb_deregister_bus(&hcd->self); 2897 usb_deregister_bus(&hcd->self);
2897 hcd_buffer_destroy(hcd); 2898 hcd_buffer_destroy(hcd);
2898 2899
2899 if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->phy) { 2900 if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->remove_phy && hcd->phy) {
2900 phy_power_off(hcd->phy); 2901 phy_power_off(hcd->phy);
2901 phy_exit(hcd->phy); 2902 phy_exit(hcd->phy);
2902 phy_put(hcd->phy); 2903 phy_put(hcd->phy);