]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
USB: add all configs to the "descriptors" attribute
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 20 May 2008 20:40:42 +0000 (16:40 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 29 May 2008 20:59:03 +0000 (13:59 -0700)
commit217a9081d8e69026186067711131b77f0ce219ed
tree7933ca5e141fea2f5fe7595e5e1cc4580bb68488
parente16362a0c8d90e9adbfe477acbe32b021823fb22
USB: add all configs to the "descriptors" attribute

This patch (as1094) changes the output of the "descriptors" binary
attribute.  Now it will contain the device descriptor followed by all
the configuration descriptors, not just the descriptor for the current
config.

Userspace libraries want to have access to the kernel's cached
descriptor information, so they can learn about device characteristics
without having to wake up suspended devices.  So far the only user of
this attribute is the new libusb-1.0 library; thus changing its
contents shouldn't cause any problems.

This should be considered for 2.6.26, if for no other reason than to
minimize the range of releases in which the attribute contains only the
current config descriptor.

Also, it doesn't hurt that the patch removes the device locking --
which was formerly needed in order to know for certain which config was
indeed current.

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