Commit be69e5b1 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[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: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e5278320
This diff is collapsed.
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment