From: Mian Yousaf Kaukab Date: Wed, 29 Apr 2015 20:09:12 +0000 (+0200) Subject: usb: dwc2: host: register handle to the phy X-Git-Tag: v4.2-rc1~86^2~16^2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9df4ceac8b359b6c261c10132fd3a49558bebd16;p=platform%2Fkernel%2Flinux-exynos.git usb: dwc2: host: register handle to the phy If phy driver is present register hcd handle to it. Acked-by: John Youn Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 8757f62..1875f7a 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -2913,6 +2913,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq) /* Don't support SG list at this point */ hcd->self.sg_tablesize = 0; + if (!IS_ERR_OR_NULL(hsotg->uphy)) + otg_set_host(hsotg->uphy->otg, &hcd->self); + /* * Finish generic HCD initialization and start the HCD. This function * allocates the DMA buffer pool, registers the USB bus, requests the @@ -2966,6 +2969,9 @@ void dwc2_hcd_remove(struct dwc2_hsotg *hsotg) return; } + if (!IS_ERR_OR_NULL(hsotg->uphy)) + otg_set_host(hsotg->uphy->otg, NULL); + usb_remove_hcd(hcd); hsotg->priv = NULL; dwc2_hcd_release(hsotg);