Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42a58c99 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Greg Kroah-Hartman
Browse files

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: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4fc056ed
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -221,6 +221,9 @@ static int ehci_platform_probe(struct platform_device *dev)
			if (IS_ERR(priv->phys[phy_num])) {
				err = PTR_ERR(priv->phys[phy_num]);
					goto err_put_hcd;
			} else if (!hcd->phy) {
				/* Avoiding phy_get() in usb_add_hcd() */
				hcd->phy = priv->phys[phy_num];
			}
		}