aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc2/platform.c')
-rw-r--r--drivers/usb/dwc2/platform.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
index 4fc8c603afb8..9564bc76c56f 100644
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -111,7 +111,7 @@ static int dwc2_get_dr_mode(struct dwc2_hsotg *hsotg)
111 111
112 if (mode != hsotg->dr_mode) { 112 if (mode != hsotg->dr_mode) {
113 dev_warn(hsotg->dev, 113 dev_warn(hsotg->dev,
114 "Configuration mismatch. dr_mode forced to %s\n", 114 "Configuration mismatch. dr_mode forced to %s\n",
115 mode == USB_DR_MODE_HOST ? "host" : "device"); 115 mode == USB_DR_MODE_HOST ? "host" : "device");
116 116
117 hsotg->dr_mode = mode; 117 hsotg->dr_mode = mode;
@@ -136,11 +136,11 @@ static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
136 return ret; 136 return ret;
137 } 137 }
138 138
139 if (hsotg->uphy) 139 if (hsotg->uphy) {
140 ret = usb_phy_init(hsotg->uphy); 140 ret = usb_phy_init(hsotg->uphy);
141 else if (hsotg->plat && hsotg->plat->phy_init) 141 } else if (hsotg->plat && hsotg->plat->phy_init) {
142 ret = hsotg->plat->phy_init(pdev, hsotg->plat->phy_type); 142 ret = hsotg->plat->phy_init(pdev, hsotg->plat->phy_type);
143 else { 143 } else {
144 ret = phy_power_on(hsotg->phy); 144 ret = phy_power_on(hsotg->phy);
145 if (ret == 0) 145 if (ret == 0)
146 ret = phy_init(hsotg->phy); 146 ret = phy_init(hsotg->phy);
@@ -170,11 +170,11 @@ static int __dwc2_lowlevel_hw_disable(struct dwc2_hsotg *hsotg)
170 struct platform_device *pdev = to_platform_device(hsotg->dev); 170 struct platform_device *pdev = to_platform_device(hsotg->dev);
171 int ret = 0; 171 int ret = 0;
172 172
173 if (hsotg->uphy) 173 if (hsotg->uphy) {
174 usb_phy_shutdown(hsotg->uphy); 174 usb_phy_shutdown(hsotg->uphy);
175 else if (hsotg->plat && hsotg->plat->phy_exit) 175 } else if (hsotg->plat && hsotg->plat->phy_exit) {
176 ret = hsotg->plat->phy_exit(pdev, hsotg->plat->phy_type); 176 ret = hsotg->plat->phy_exit(pdev, hsotg->plat->phy_type);
177 else { 177 } else {
178 ret = phy_exit(hsotg->phy); 178 ret = phy_exit(hsotg->phy);
179 if (ret == 0) 179 if (ret == 0)
180 ret = phy_power_off(hsotg->phy); 180 ret = phy_power_off(hsotg->phy);
@@ -445,7 +445,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
445 } 445 }
446 446
447 if (hsotg->dr_mode != USB_DR_MODE_PERIPHERAL) { 447 if (hsotg->dr_mode != USB_DR_MODE_PERIPHERAL) {
448 retval = dwc2_hcd_init(hsotg, hsotg->irq); 448 retval = dwc2_hcd_init(hsotg);
449 if (retval) { 449 if (retval) {
450 if (hsotg->gadget_enabled) 450 if (hsotg->gadget_enabled)
451 dwc2_hsotg_remove(hsotg); 451 dwc2_hsotg_remove(hsotg);