|
@@ -1904,7 +1904,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
|
|
|
|
|
|
if (!musb->isr) {
|
|
|
status = -ENODEV;
|
|
|
- goto fail3;
|
|
|
+ goto fail2;
|
|
|
}
|
|
|
|
|
|
if (!musb->xceiv->io_ops) {
|
|
@@ -1912,6 +1912,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
|
|
|
musb->xceiv->io_ops = &musb_ulpi_access;
|
|
|
}
|
|
|
|
|
|
+ pm_runtime_get_sync(musb->controller);
|
|
|
+
|
|
|
#ifndef CONFIG_MUSB_PIO_ONLY
|
|
|
if (use_dma && dev->dma_mask) {
|
|
|
struct dma_controller *c;
|
|
@@ -2023,6 +2025,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
|
|
|
goto fail5;
|
|
|
#endif
|
|
|
|
|
|
+ pm_runtime_put(musb->controller);
|
|
|
+
|
|
|
dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n",
|
|
|
({char *s;
|
|
|
switch (musb->board_mode) {
|
|
@@ -2047,6 +2051,9 @@ fail4:
|
|
|
musb_gadget_cleanup(musb);
|
|
|
|
|
|
fail3:
|
|
|
+ pm_runtime_put_sync(musb->controller);
|
|
|
+
|
|
|
+fail2:
|
|
|
if (musb->irq_wake)
|
|
|
device_init_wakeup(dev, 0);
|
|
|
musb_platform_exit(musb);
|