Commit 03e43528 authored by Tony Lindgren's avatar Tony Lindgren Committed by Felipe Balbi

usb: musb: Fix unbalanced pm_runtime_enable

When reloading omap2430 kernel module we get a warning about
unbalanced pm_runtime_enable. Let's fix this. Note that we
need to do this after the child musb-core platform_device is
removed because of pm_runtime_irq_safe being set at the child.

Cc: Bin Liu <b-liu@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: NeilBrown <neil@brown.name>
Reviewed-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 8055555f
...@@ -664,8 +664,11 @@ static int omap2430_remove(struct platform_device *pdev) ...@@ -664,8 +664,11 @@ static int omap2430_remove(struct platform_device *pdev)
{ {
struct omap2430_glue *glue = platform_get_drvdata(pdev); struct omap2430_glue *glue = platform_get_drvdata(pdev);
pm_runtime_get_sync(glue->dev);
cancel_work_sync(&glue->omap_musb_mailbox_work); cancel_work_sync(&glue->omap_musb_mailbox_work);
platform_device_unregister(glue->musb); platform_device_unregister(glue->musb);
pm_runtime_put_sync(glue->dev);
pm_runtime_disable(glue->dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment