usb: skip phys initialization of shared hcd
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Thu, 22 Mar 2018 12:12:50 +0000 (20:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 12:53:33 +0000 (13:53 +0100)
The phys has already been initialized when add primary hcd,
including usb2 phys and usb3 phys also if exist, so needn't
re-parse "phys" property again.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c

index 5a92d8f7c48478d0cc9d4d04e54f57c535e36c83..777036ae63674af94e845a78e0cf75e607f8ba68 100644 (file)
@@ -2757,7 +2757,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
                }
        }
 
-       if (!hcd->skip_phy_initialization) {
+       if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) {
                hcd->phy_roothub = usb_phy_roothub_init(hcd->self.sysdev);
                if (IS_ERR(hcd->phy_roothub)) {
                        retval = PTR_ERR(hcd->phy_roothub);