]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
USB: don't touch sysfs stuff when altsetting is unchanged
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 8 Aug 2007 15:59:18 +0000 (11:59 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:10 +0000 (14:55 -0700)
commitd74d4a69dc1cc7ddc0eabb9c9f1e45005e2984eb
treea1a8465235c4ea6951100e9d8ce24ae63b481399
parente9df41c5c5899259541dc928872cad4d07b82076
USB: don't touch sysfs stuff when altsetting is unchanged

This patch (as955) prevents the interface-related sysfs files and
endpoint pseudo-devices from being deleted and recreated when a call
to usb_set_interface() specifies the current altsetting.  Since the
altsetting doesn't get changed, there's no need to do anything.

Furthermore, avoiding changes to the endpoint devices will be
necessary in the future.  This code is called from usb_reset_device(),
which gets invoked for reset-resume processing, but upcoming changes
to the PM and driver cores will make it impossible to register devices
while a suspend/resume transition is in progress.  Since we don't need
to re-register those endpoint devices anyhow, it's best to skip the
whole thing.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/message.c