usbcore: remove unused argument in autosuspend
Thanks to several earlier patches, usb_autosuspend_device() and usb_autoresume_device() are never called with a second argument other than 1. This patch (as819) removes the now-redundant argument. It also consolidates some common code between those two routines, putting it into a new subroutine called usb_autopm_do_device(). And it includes a sizable kerneldoc update for the affected functions. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ee49fb5dc8
commit
94fcda1f8a
@ -1398,7 +1398,7 @@ free_interfaces:
|
||||
}
|
||||
|
||||
/* Wake up the device so we can send it the Set-Config request */
|
||||
ret = usb_autoresume_device(dev, 1);
|
||||
ret = usb_autoresume_device(dev);
|
||||
if (ret)
|
||||
goto free_interfaces;
|
||||
|
||||
@ -1421,7 +1421,7 @@ free_interfaces:
|
||||
dev->actconfig = cp;
|
||||
if (!cp) {
|
||||
usb_set_device_state(dev, USB_STATE_ADDRESS);
|
||||
usb_autosuspend_device(dev, 1);
|
||||
usb_autosuspend_device(dev);
|
||||
goto free_interfaces;
|
||||
}
|
||||
usb_set_device_state(dev, USB_STATE_CONFIGURED);
|
||||
@ -1490,7 +1490,7 @@ free_interfaces:
|
||||
usb_create_sysfs_intf_files (intf);
|
||||
}
|
||||
|
||||
usb_autosuspend_device(dev, 1);
|
||||
usb_autosuspend_device(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user