]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
USB: create attributes before sending uevent
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 30 Apr 2008 19:37:19 +0000 (15:37 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 14 May 2008 17:00:26 +0000 (10:00 -0700)
commit2e5f10e4f0a9649186d8a8c793822b2e0dae8373
treeb05f66b353cd9537fc031b387c03040d3b92dcc6
parent6986a978eec70c867717fe6bee736f0bd1db1508
USB: create attributes before sending uevent

This patch (as1087d) fixes a long-standing problem in usbcore: Device,
interface, and endpoint attributes aren't added until _after_ the
creation uevent has already been broadcast.

Unfortunately there are a few attributes which cannot be created that
early.  The "descriptors" attribute is binary and so must be created
separately.  The power-management attributes can't be created until
the dev/power/ group exists.  And the interface string can vary from
one altsetting to another, so it has to be created dynamically.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/endpoint.c
drivers/usb/core/message.c
drivers/usb/core/sysfs.c
drivers/usb/core/usb.c
drivers/usb/core/usb.h