]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
usb: core: Add PM runtime calls to usb_hcd_platform_shutdown
authorTony Lindgren <tony@atomide.com>
Fri, 22 Mar 2019 21:54:05 +0000 (14:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Mar 2019 07:42:53 +0000 (16:42 +0900)
If ohci-platform is runtime suspended, we can currently get an "imprecise
external abort" on reboot with ohci-platform loaded when PM runtime
is implemented for the SoC.

Let's fix this by adding PM runtime support to usb_hcd_platform_shutdown.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c

index 3189181bb628d921309d44296da06eff92b5d1bd..b227a2651e7c28f4023a300ef83dbbf40f962ecd 100644 (file)
@@ -3017,6 +3017,9 @@ usb_hcd_platform_shutdown(struct platform_device *dev)
 {
        struct usb_hcd *hcd = platform_get_drvdata(dev);
 
+       /* No need for pm_runtime_put(), we're shutting down */
+       pm_runtime_get_sync(&dev->dev);
+
        if (hcd->driver->shutdown)
                hcd->driver->shutdown(hcd);
 }