summary refs log tree commit diff
path: root/drivers/usb/musb/musb_gadget.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2016-05-31 10:05:11 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-01 14:58:59 -0700
commit7099dbc5b3eb9f52efdb78406826f7463f07d71c (patch)
tree21c887c1fd8f5428feff8e62cd1519b5df2d76ed /drivers/usb/musb/musb_gadget.c
parent302f6802395f58dceb225b1c9e603de72f09b8b0 (diff)
downloadlinux-7099dbc5b3eb9f52efdb78406826f7463f07d71c.tar.gz
usb: musb: Update to use PM runtime autosuspend
Let's make the PM runtime use the standard autosuspend calls.
Commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe
error and driver unbind") means we must pair use_autosuspend with
dont_use_autosuspend and then use put_sync to properly idle the
device.

Note that we'll be removing the PM runtime calls from the glue
layer to the MUSB core in the next patch. And we can also remove
the pointless FIXME comment now.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r--drivers/usb/musb/musb_gadget.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 152865b36522..fff5a8a283e3 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1963,7 +1963,8 @@ static int musb_gadget_stop(struct usb_gadget *g)
 	 * that currently misbehaves.
 	 */
 
-	pm_runtime_put(musb->controller);
+	pm_runtime_mark_last_busy(musb->controller);
+	pm_runtime_put_autosuspend(musb->controller);
 
 	return 0;
 }