From f1d03b9fc26d2ff43a2ddd4a9ff307df609fd5f7 Mon Sep 17 00:00:00 2001 From: Michal Nazarewicz Date: Thu, 14 Apr 2011 17:47:09 +0200 Subject: [PATCH] --- yaml --- r: 248766 b: refs/heads/master c: 643de6240b0b59c420ad71dfeeb3125a3607af92 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/sysfs.c | 13 +++++-------- trunk/drivers/usb/core/usb.c | 3 +-- trunk/drivers/usb/core/usb.h | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 6e3d5532c8a1..bba1132918ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 869410f82cbbb1464772046d87de8d18a916e706 +refs/heads/master: 643de6240b0b59c420ad71dfeeb3125a3607af92 diff --git a/trunk/drivers/usb/core/sysfs.c b/trunk/drivers/usb/core/sysfs.c index 6781c369ce2d..cf05b97693ea 100644 --- a/trunk/drivers/usb/core/sysfs.c +++ b/trunk/drivers/usb/core/sysfs.c @@ -842,22 +842,19 @@ const struct attribute_group *usb_interface_groups[] = { NULL }; -int usb_create_sysfs_intf_files(struct usb_interface *intf) +void usb_create_sysfs_intf_files(struct usb_interface *intf) { struct usb_device *udev = interface_to_usbdev(intf); struct usb_host_interface *alt = intf->cur_altsetting; - int retval; if (intf->sysfs_files_created || intf->unregistering) - return 0; + return; - if (alt->string == NULL && - !(udev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) + if (!alt->string && !(udev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) alt->string = usb_cache_string(udev, alt->desc.iInterface); - if (alt->string) - retval = device_create_file(&intf->dev, &dev_attr_interface); + if (alt->string && device_create_file(&intf->dev, &dev_attr_interface)) + ; /* We don't actually care if the function fails. */ intf->sysfs_files_created = 1; - return 0; } void usb_remove_sysfs_intf_files(struct usb_interface *intf) diff --git a/trunk/drivers/usb/core/usb.c b/trunk/drivers/usb/core/usb.c index d9d4b169404f..8706fc97e60f 100644 --- a/trunk/drivers/usb/core/usb.c +++ b/trunk/drivers/usb/core/usb.c @@ -953,8 +953,7 @@ static int usb_bus_notify(struct notifier_block *nb, unsigned long action, if (dev->type == &usb_device_type) (void) usb_create_sysfs_dev_files(to_usb_device(dev)); else if (dev->type == &usb_if_device_type) - (void) usb_create_sysfs_intf_files( - to_usb_interface(dev)); + usb_create_sysfs_intf_files(to_usb_interface(dev)); break; case BUS_NOTIFY_DEL_DEVICE: diff --git a/trunk/drivers/usb/core/usb.h b/trunk/drivers/usb/core/usb.h index d450b742137e..d44d4b7bbf17 100644 --- a/trunk/drivers/usb/core/usb.h +++ b/trunk/drivers/usb/core/usb.h @@ -4,7 +4,7 @@ extern int usb_create_sysfs_dev_files(struct usb_device *dev); extern void usb_remove_sysfs_dev_files(struct usb_device *dev); -extern int usb_create_sysfs_intf_files(struct usb_interface *intf); +extern void usb_create_sysfs_intf_files(struct usb_interface *intf); extern void usb_remove_sysfs_intf_files(struct usb_interface *intf); extern int usb_create_ep_devs(struct device *parent, struct usb_host_endpoint *endpoint,