[PATCH/RFC 1/2] usb: host: ehci-platform: set hcd->phy to avoid phy_get() in usb_add_hcd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch sets hcd->phy from own phy context to avoid phy_get()
in usb_add_hcd(). Since hcd.c manage the phy only in usb_add_hcd()
and usb_remove_hcd(), there is difficult to manage the phy in
suspend/resume.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
---
 drivers/usb/host/ehci-platform.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index a268d9e..4ae27e9 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -222,6 +222,8 @@ static int ehci_platform_probe(struct platform_device *dev)
 					goto err_put_hcd;
 			}
 		}
+		/* Avoiding phy_get in usb_add_hcd() */
+		hcd->phy = priv->phys[0];
 
 		for (clk = 0; clk < EHCI_MAX_CLKS; clk++) {
 			priv->clks[clk] = of_clk_get(dev->dev.of_node, clk);
-- 
1.9.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux