From: Tony Lindgren Date: Tue, 1 Dec 2015 05:37:13 +0000 (-0800) Subject: usb: musb: Fix unbalanced pm_runtime_enable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=03e43528ab68449921201744a731c1bac50bc9d1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Felipe Balbi Cc: Kishon Vijay Abraham I Cc: NeilBrown Reviewed-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index bf05f807729f..c84e0322c108 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -664,8 +664,11 @@ static int omap2430_remove(struct platform_device *pdev) { struct omap2430_glue *glue = platform_get_drvdata(pdev); + pm_runtime_get_sync(glue->dev); cancel_work_sync(&glue->omap_musb_mailbox_work); platform_device_unregister(glue->musb); + pm_runtime_put_sync(glue->dev); + pm_runtime_disable(glue->dev); return 0; }