diff options
Diffstat (limited to 'drivers/usb/host/ohci-omap3.c')
-rw-r--r-- | drivers/usb/host/ohci-omap3.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c index 516ebc4d6cc2..1b8133b6e451 100644 --- a/drivers/usb/host/ohci-omap3.c +++ b/drivers/usb/host/ohci-omap3.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <plat/usb.h> | 33 | #include <plat/usb.h> |
34 | #include <linux/pm_runtime.h> | ||
34 | 35 | ||
35 | /*-------------------------------------------------------------------------*/ | 36 | /*-------------------------------------------------------------------------*/ |
36 | 37 | ||
@@ -134,7 +135,7 @@ static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev) | |||
134 | int irq; | 135 | int irq; |
135 | 136 | ||
136 | if (usb_disabled()) | 137 | if (usb_disabled()) |
137 | goto err_end; | 138 | return -ENODEV; |
138 | 139 | ||
139 | if (!dev->parent) { | 140 | if (!dev->parent) { |
140 | dev_err(dev, "Missing parent device\n"); | 141 | dev_err(dev, "Missing parent device\n"); |
@@ -172,11 +173,8 @@ static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev) | |||
172 | hcd->rsrc_len = resource_size(res); | 173 | hcd->rsrc_len = resource_size(res); |
173 | hcd->regs = regs; | 174 | hcd->regs = regs; |
174 | 175 | ||
175 | ret = omap_usbhs_enable(dev); | 176 | pm_runtime_enable(dev); |
176 | if (ret) { | 177 | pm_runtime_get_sync(dev); |
177 | dev_dbg(dev, "failed to start ohci\n"); | ||
178 | goto err_end; | ||
179 | } | ||
180 | 178 | ||
181 | ohci_hcd_init(hcd_to_ohci(hcd)); | 179 | ohci_hcd_init(hcd_to_ohci(hcd)); |
182 | 180 | ||
@@ -189,9 +187,7 @@ static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev) | |||
189 | return 0; | 187 | return 0; |
190 | 188 | ||
191 | err_add_hcd: | 189 | err_add_hcd: |
192 | omap_usbhs_disable(dev); | 190 | pm_runtime_put_sync(dev); |
193 | |||
194 | err_end: | ||
195 | usb_put_hcd(hcd); | 191 | usb_put_hcd(hcd); |
196 | 192 | ||
197 | err_io: | 193 | err_io: |
@@ -220,9 +216,9 @@ static int __devexit ohci_hcd_omap3_remove(struct platform_device *pdev) | |||
220 | 216 | ||
221 | iounmap(hcd->regs); | 217 | iounmap(hcd->regs); |
222 | usb_remove_hcd(hcd); | 218 | usb_remove_hcd(hcd); |
223 | omap_usbhs_disable(dev); | 219 | pm_runtime_put_sync(dev); |
220 | pm_runtime_disable(dev); | ||
224 | usb_put_hcd(hcd); | 221 | usb_put_hcd(hcd); |
225 | |||
226 | return 0; | 222 | return 0; |
227 | } | 223 | } |
228 | 224 | ||