Skip to contentSkip to conversation

usb: musb: drop superfluous pm_runtime calls around musb_shutdown

PATCH Applied Grazvydas Ignotas 5 participants 6 messages Jan 12, 2012 – Jan 24, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: musb: drop superfluous pm_runtime calls around musb_shutdown

Since commit 4f9edd2d7e8d "usb: musb: Fix the crash issue during reboot" musb_shutdown() does pm_runtime_get_sync/pm_runtime_put by itself, so this no longer needs to be done by the caller. Also, musb_exit_debugfs() doesn't access the device, so just drop those runtime_pm calls.

---
 drivers/usb/musb/musb_core.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/usb/musb/musb_core.c +0 -2
index 485f7ba..b2ca6fd 100644
@@ -2162,11 +2162,9 @@ static int __exit musb_remove(struct platform_device *pdev)
 	 *  - Peripheral mode: peripheral is deactivated (or never-activated)
 	 *  - OTG mode: both roles are deactivated (or never-activated)
 	 */
-	pm_runtime_get_sync(musb->controller);
 	musb_exit_debugfs(musb);
 	musb_shutdown(pdev);
 
-	pm_runtime_put(musb->controller);
 	musb_free(musb);
 	iounmap(ctrl_base);
 	device_init_wakeup(&pdev->dev, 0);
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 4 lines · Grazvydas Ignotas

Since commit 4f9edd2d7e8d "usb: musb: Fix the crash issue during reboot" musb_shutdown() does pm_runtime_get_sync/pm_runtime_put by itself, so this no longer needs to be done by the caller. Also, musb_exit_debugfs() doesn't access the device, so just drop those runtime_pm calls.

I don't understand what is the relationship with 4f9edd2d7e8d and musb_shutdown(), it seems this patch is basically reverting 4f9edd2d7e8d.

Cheers.

Signature · 1 line
Felipe Contreras
#3 lore raw
In reply to a message not in the archive
Quoted 9 lines · Felipe Contreras
Quoted 4 lines · Grazvydas Ignotas

Since commit 4f9edd2d7e8d "usb: musb: Fix the crash issue during reboot" musb_shutdown() does pm_runtime_get_sync/pm_runtime_put by itself, so this no longer needs to be done by the caller. Also, musb_exit_debugfs() doesn't access the device, so just drop those runtime_pm calls.

I don't understand what is the relationship with 4f9edd2d7e8d and musb_shutdown(), it seems this patch is basically reverting 4f9edd2d7e8d.

No it's not, read my patch and it's description again. 4f9edd2d7e8d is patching musb_shutdown(), mine musb_remove().

Signature · 5 lines
Gražvydas
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
Quoted 8 lines · Grazvydas Ignotas
Quoted 6 lines · Felipe Contreras
Quoted 4 lines · Grazvydas Ignotas

Since commit 4f9edd2d7e8d "usb: musb: Fix the crash issue during reboot" musb_shutdown() does pm_runtime_get_sync/pm_runtime_put by itself, so this no longer needs to be done by the caller. Also, musb_exit_debugfs() doesn't access the device, so just drop those runtime_pm calls.

Quoted 6 lines
Quoted 3 lines

I don't understand what is the relationship with 4f9edd2d7e8d and musb_shutdown(), it seems this patch is basically reverting 4f9edd2d7e8d.

No it's not, read my patch and it's description again. 4f9edd2d7e8d is patching musb_shutdown(), mine musb_remove().

Ohh, OK.

Signature · 1 line
Felipe Contreras
Reviewed-by on v1 1/1
#5 lore raw
In reply to Grazvydas Ignotas
Quoted 6 lines · Grazvydas Ignotas

Since commit 4f9edd2d7e8d "usb: musb: Fix the crash issue during reboot" musb_shutdown() does pm_runtime_get_sync/pm_runtime_put by itself, so this no longer needs to be done by the caller. Also, musb_exit_debugfs() doesn't access the device, so just drop those runtime_pm calls.

Looks good to me

Applied
#6 lore raw
In reply to Grazvydas Ignotas
Quoted 6 lines · Grazvydas Ignotas

Since commit 4f9edd2d7e8d "usb: musb: Fix the crash issue during reboot" musb_shutdown() does pm_runtime_get_sync/pm_runtime_put by itself, so this no longer needs to be done by the caller. Also, musb_exit_debugfs() doesn't access the device, so just drop those runtime_pm calls.

applied, thanks

Signature · 1 line
balbi