• Alan Stern's avatar
    USB: improve uses of usb_mark_last_busy · c08512c7
    Alan Stern authored
    This patch (as1434) cleans up the uses of usb_mark_last_busy() in
    usbcore.  The function will be called when a device is resumed and
    whenever a usage count is decremented.  A call that was missing from
    the hub driver is added: A hub is used whenever one of its ports gets
    suspended (this prevents hubs from suspending immediately after their
    last child).
    
    In addition, the call to disable autosuspend support for new devices
    by default is moved from usb_detect_quirks() (where it doesn't really
    belong) into usb_new_device() along with all the other runtime-PM
    initializations.  Finally, an extra pm_runtime_get_noresume() is added
    to prevent new devices from autosuspending while they are being
    registered.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    c08512c7
driver.c 48.7 KB