diff options
Diffstat (limited to 'drivers/usb/core/endpoint.c')
| -rw-r--r-- | drivers/usb/core/endpoint.c | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index 99e5a68a3f1..fae55a31e26 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c @@ -156,6 +156,10 @@ static struct attribute *ep_dev_attrs[] = {  static struct attribute_group ep_dev_attr_grp = {  	.attrs = ep_dev_attrs,  }; +static struct attribute_group *ep_dev_groups[] = { +	&ep_dev_attr_grp, +	NULL +};  static int usb_endpoint_major_init(void)  { @@ -298,6 +302,7 @@ int usb_create_ep_files(struct device *parent,  	ep_dev->desc = &endpoint->desc;  	ep_dev->udev = udev; +	ep_dev->dev.groups = ep_dev_groups;  	ep_dev->dev.devt = MKDEV(usb_endpoint_major, ep_dev->minor);  	ep_dev->dev.class = ep_class->class;  	ep_dev->dev.parent = parent; @@ -309,9 +314,6 @@ int usb_create_ep_files(struct device *parent,  	retval = device_register(&ep_dev->dev);  	if (retval)  		goto error_chrdev; -	retval = sysfs_create_group(&ep_dev->dev.kobj, &ep_dev_attr_grp); -	if (retval) -		goto error_group;  	/* create the symlink to the old-style "ep_XX" directory */  	sprintf(name, "ep_%02x", endpoint->desc.bEndpointAddress); @@ -322,8 +324,6 @@ int usb_create_ep_files(struct device *parent,  	return retval;  error_link: -	sysfs_remove_group(&ep_dev->dev.kobj, &ep_dev_attr_grp); -error_group:  	device_unregister(&ep_dev->dev);  	destroy_endpoint_class();  	return retval; @@ -348,7 +348,6 @@ void usb_remove_ep_files(struct usb_host_endpoint *endpoint)  		sprintf(name, "ep_%02x", endpoint->desc.bEndpointAddress);  		sysfs_remove_link(&ep_dev->dev.parent->kobj, name); -		sysfs_remove_group(&ep_dev->dev.kobj, &ep_dev_attr_grp);  		device_unregister(&ep_dev->dev);  		endpoint->ep_dev = NULL;  		destroy_endpoint_class();  |