[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>
diff --git a/include/linux/usb.h b/include/linux/usb.h
index a2d923f..465ff45 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -57,10 +57,7 @@
 	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;