staging: gdm724x: get lock before calling usb_[disable|enable]_autosuspend()
PATCH 1/1 staging: gdm724x: get lock before calling usb_[disable|enable]_autosuspend()
Based on the documentation of usb_[disable|enable]_autosuspend(), the caller must hold udev's device lock.
Signed-off-by Salah Triki <[email protected]>
--- drivers/staging/gdm724x/gdm_usb.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/gdm724x/gdm_usb.c +2 -0
@@ -846,7 +846,9 @@ static int gdm_usb_probe(struct usb_interface *intf, udev->intf = intf; intf->needs_remote_wakeup =1 ; +usb_lock_device (usbdev);usb_enable_autosuspend (usbdev); +usb_unlock_device (usbdev);pm_runtime_set_autosuspend_delay (&usbdev->dev,AUTO_SUSPEND_TIMER );/* List up hosts with big endians, otherwise,
Signature · 1 line
2.25.1
Greg Kroah-Hartman
maintainerQuoted 24 lines · Salah Triki
Based on the documentation of usb_[disable|enable]_autosuspend(), the caller must hold udev's device lock.
Signed-off-by Salah Triki <[email protected]>--- drivers/staging/gdm724x/gdm_usb.c | 2 ++ 1 file changed, 2 insertions(+)drivers/staging/gdm724x/gdm_usb.c +2
-0@@ -846,7 +846,9 @@ static int gdm_usb_probe(struct usb_interface *intf, udev->intf = intf; intf->needs_remote_wakeup =1 ; +usb_lock_device (usbdev);usb_enable_autosuspend (usbdev); +usb_unlock_device (usbdev);pm_runtime_set_autosuspend_delay (&usbdev->dev,AUTO_SUSPEND_TIMER );/* List up hosts with big endians, otherwise, Signature · 1 line
2.25.1
Please look at the other places where this function is called and note that the pattern you have added here is not used in those situations either, so perhaps this change is not correct at all.
thanks,
greg k-h