aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/sysfs.c
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2011-04-14 17:47:09 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-29 17:24:38 -0700
commit643de6240b0b59c420ad71dfeeb3125a3607af92 (patch)
treea36dacc2a5c7eb9023c6d7d8a99d667e31551237 /drivers/usb/core/sysfs.c
parent869410f82cbbb1464772046d87de8d18a916e706 (diff)
downloadkernel_goldelico_gta04-643de6240b0b59c420ad71dfeeb3125a3607af92.zip
kernel_goldelico_gta04-643de6240b0b59c420ad71dfeeb3125a3607af92.tar.gz
kernel_goldelico_gta04-643de6240b0b59c420ad71dfeeb3125a3607af92.tar.bz2
usb: core: Change usb_create_sysfs_intf_files()' return type to void
The usb_create_sysfs_intf_files() function always returned zero even if it failed to create sysfs fails. Since this is a desired behaviour there is no need to return return code at all. This commit changes function's return type (form int) to void. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/sysfs.c')
-rw-r--r--drivers/usb/core/sysfs.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index 6781c36..cf05b97 100644
--- a/drivers/usb/core/sysfs.c
+++ b/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)