aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-07-06 15:37:42 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:49 -0400
commitb6eb2d84d2bb01e9fcc46a032a3429b4747b1c47 (patch)
tree29b45817f18101378d4943fa354c1f553f7e5a64
parentb94badbb47cb50f4fca8440efdaa8ebd32604fe4 (diff)
usbcore: add configuration_string to attribute group
This patch (as737b) does a very small cleanup of core/sysfs.c by adding the configuration_string attribute file to the existing attribute group instead of treating it separately. It doesn't need this separate treatment because unlike the other device string attributes, it changes along with the active configuration. The patch also fixes a simple typo (which, oddly enough, doesn't seem to bother the compiler). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/core/sysfs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index dec973affb0f..cd2286246f6a 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -60,7 +60,7 @@ static ssize_t
60set_bConfigurationValue (struct device *dev, struct device_attribute *attr, 60set_bConfigurationValue (struct device *dev, struct device_attribute *attr,
61 const char *buf, size_t count) 61 const char *buf, size_t count)
62{ 62{
63 struct usb_device *udev = udev = to_usb_device (dev); 63 struct usb_device *udev = to_usb_device (dev);
64 int config, value; 64 int config, value;
65 65
66 if (sscanf (buf, "%u", &config) != 1 || config > 255) 66 if (sscanf (buf, "%u", &config) != 1 || config > 255)
@@ -186,6 +186,7 @@ usb_descriptor_attr (bMaxPacketSize0, "%d\n")
186 186
187static struct attribute *dev_attrs[] = { 187static struct attribute *dev_attrs[] = {
188 /* current configuration's attributes */ 188 /* current configuration's attributes */
189 &dev_attr_configuration.attr,
189 &dev_attr_bNumInterfaces.attr, 190 &dev_attr_bNumInterfaces.attr,
190 &dev_attr_bConfigurationValue.attr, 191 &dev_attr_bConfigurationValue.attr,
191 &dev_attr_bmAttributes.attr, 192 &dev_attr_bmAttributes.attr,
@@ -221,7 +222,6 @@ void usb_create_sysfs_dev_files (struct usb_device *udev)
221 device_create_file (dev, &dev_attr_product); 222 device_create_file (dev, &dev_attr_product);
222 if (udev->serial) 223 if (udev->serial)
223 device_create_file (dev, &dev_attr_serial); 224 device_create_file (dev, &dev_attr_serial);
224 device_create_file (dev, &dev_attr_configuration);
225 usb_create_ep_files(dev, &udev->ep0, udev); 225 usb_create_ep_files(dev, &udev->ep0, udev);
226} 226}
227 227
@@ -238,7 +238,6 @@ void usb_remove_sysfs_dev_files (struct usb_device *udev)
238 device_remove_file(dev, &dev_attr_product); 238 device_remove_file(dev, &dev_attr_product);
239 if (udev->serial) 239 if (udev->serial)
240 device_remove_file(dev, &dev_attr_serial); 240 device_remove_file(dev, &dev_attr_serial);
241 device_remove_file (dev, &dev_attr_configuration);
242} 241}
243 242
244/* Interface fields */ 243/* Interface fields */