Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299408
b: refs/heads/master
c: c04352a
h: refs/heads/master
v: v3
  • Loading branch information
Grazvydas Ignotas authored and Felipe Balbi committed Apr 10, 2012
1 parent 976f21e commit c565ccf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afb76df140823c57738598a876cd1d6568cd57c7
refs/heads/master: c04352a590538123f8c93bd87ef1d4bb9e3a64c7
9 changes: 8 additions & 1 deletion trunk/drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1904,14 +1904,16 @@ 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) {
musb->xceiv->io_priv = musb->mregs;
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;
Expand Down Expand Up @@ -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) {
Expand All @@ -2047,6 +2051,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
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);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/musb/omap2430.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ static int omap2430_musb_init(struct musb *musb)

setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);

pm_runtime_put_noidle(musb->controller);
return 0;

err1:
Expand Down Expand Up @@ -478,7 +479,6 @@ static int __devexit omap2430_remove(struct platform_device *pdev)

platform_device_del(glue->musb);
platform_device_put(glue->musb);
pm_runtime_put(&pdev->dev);
kfree(glue);

return 0;
Expand Down

0 comments on commit c565ccf

Please sign in to comment.