usb: cdc-wdm: manage_power should always set needs_remote_wakeup
Cc: stable <stable@vger.kernel.org> Reported-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
757de81e8b
commit
4144bc861e
1 changed files with 3 additions and 5 deletions
|
@ -854,13 +854,11 @@ static int wdm_manage_power(struct usb_interface *intf, int on)
|
||||||
{
|
{
|
||||||
/* need autopm_get/put here to ensure the usbcore sees the new value */
|
/* need autopm_get/put here to ensure the usbcore sees the new value */
|
||||||
int rv = usb_autopm_get_interface(intf);
|
int rv = usb_autopm_get_interface(intf);
|
||||||
if (rv < 0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
intf->needs_remote_wakeup = on;
|
intf->needs_remote_wakeup = on;
|
||||||
usb_autopm_put_interface(intf);
|
if (!rv)
|
||||||
err:
|
usb_autopm_put_interface(intf);
|
||||||
return rv;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue