diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2017-03-13 02:25:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-17 00:35:25 -0400 |
commit | 42a58c9949ddf16e557f5c2e22566f3440e7b60f (patch) | |
tree | 5456e118c043cbb23d15a55f989ab8a2bd09272a | |
parent | 4fc056ed55d2378905983c753afa64fb2c7e7f29 (diff) |
usb: host: ehci-platform: set hcd->phy to avoid phy_get() in usb_add_hcd()
This patch sets hcd->phy from own phy context to avoid phy_get()
in usb_add_hcd(). Since core/hcd.c manages 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@renesas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/ehci-platform.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 3214300396a0..bc7b9be12f54 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c | |||
@@ -221,6 +221,9 @@ static int ehci_platform_probe(struct platform_device *dev) | |||
221 | if (IS_ERR(priv->phys[phy_num])) { | 221 | if (IS_ERR(priv->phys[phy_num])) { |
222 | err = PTR_ERR(priv->phys[phy_num]); | 222 | err = PTR_ERR(priv->phys[phy_num]); |
223 | goto err_put_hcd; | 223 | goto err_put_hcd; |
224 | } else if (!hcd->phy) { | ||
225 | /* Avoiding phy_get() in usb_add_hcd() */ | ||
226 | hcd->phy = priv->phys[phy_num]; | ||
224 | } | 227 | } |
225 | } | 228 | } |
226 | 229 | ||