[PATCH] usbcore: Improve endpoint sysfs file handling
This revised patch (as587b) improves the implementation of USB endpoint sysfs files. Instead of storing a whole bunch of attributes for every single endpoint, each endpoint now gets its own kobject and they can share a static list of attributes. The number of extra fields added to struct usb_host_endpoint has been reduced from 4 to 1. The bEndpointAddress field is retained even though it is redundant (it repeats the same information as the attributes' directory name). The code avoids calling kobject_register, to prevent generating unwanted hotplug events. 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
e52783206a
commit
be69e5b190
@ -57,10 +57,7 @@ struct usb_host_endpoint {
|
||||
struct usb_endpoint_descriptor desc;
|
||||
struct list_head urb_list;
|
||||
void *hcpriv;
|
||||
char *attr_name;
|
||||
struct attribute_group *attr_group;
|
||||
struct attribute **attrs;
|
||||
int num_attrs;
|
||||
struct kobject *kobj; /* For sysfs info */
|
||||
|
||||
unsigned char *extra; /* Extra descriptors */
|
||||
int extralen;
|
||||
|
Reference in New Issue
Block a user