aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-10-24 15:36:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 19:47:51 -0400
commitb724ae77969fd832be71419dca74bece9af287ff (patch)
treea38ed0337bf012db4c8deec2c33d3e4ff78a2b6a /drivers/usb
parent0e6c8e8db508fcb292836b23d039649c5de29090 (diff)
[PATCH] usbcore: Wrap lines before column 80
I can't stand text lines that wrap-around in my 80-column windows. This patch (as589) makes cosmetic changes to a couple of source files. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/sysfs.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index f18317fb49ee..4cca77cf0c48 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -221,7 +221,8 @@ static void usb_remove_ep_files(struct usb_host_endpoint *endpoint)
221 221
222/* Active configuration fields */ 222/* Active configuration fields */
223#define usb_actconfig_show(field, multiplier, format_string) \ 223#define usb_actconfig_show(field, multiplier, format_string) \
224static ssize_t show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ 224static ssize_t show_##field (struct device *dev, \
225 struct device_attribute *attr, char *buf) \
225{ \ 226{ \
226 struct usb_device *udev; \ 227 struct usb_device *udev; \
227 struct usb_host_config *actconfig; \ 228 struct usb_host_config *actconfig; \
@@ -243,7 +244,8 @@ usb_actconfig_attr (bNumInterfaces, 1, "%2d\n")
243usb_actconfig_attr (bmAttributes, 1, "%2x\n") 244usb_actconfig_attr (bmAttributes, 1, "%2x\n")
244usb_actconfig_attr (bMaxPower, 2, "%3dmA\n") 245usb_actconfig_attr (bMaxPower, 2, "%3dmA\n")
245 246
246static ssize_t show_configuration_string(struct device *dev, struct device_attribute *attr, char *buf) 247static ssize_t show_configuration_string(struct device *dev,
248 struct device_attribute *attr, char *buf)
247{ 249{
248 struct usb_device *udev; 250 struct usb_device *udev;
249 struct usb_host_config *actconfig; 251 struct usb_host_config *actconfig;
@@ -266,7 +268,8 @@ static DEVICE_ATTR(configuration, S_IRUGO, show_configuration_string, NULL);
266usb_actconfig_show(bConfigurationValue, 1, "%u\n"); 268usb_actconfig_show(bConfigurationValue, 1, "%u\n");
267 269
268static ssize_t 270static ssize_t
269set_bConfigurationValue (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) 271set_bConfigurationValue (struct device *dev, struct device_attribute *attr,
272 const char *buf, size_t count)
270{ 273{
271 struct usb_device *udev = udev = to_usb_device (dev); 274 struct usb_device *udev = udev = to_usb_device (dev);
272 int config, value; 275 int config, value;
@@ -284,7 +287,8 @@ static DEVICE_ATTR(bConfigurationValue, S_IRUGO | S_IWUSR,
284 287
285/* String fields */ 288/* String fields */
286#define usb_string_attr(name) \ 289#define usb_string_attr(name) \
287static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \ 290static ssize_t show_##name(struct device *dev, \
291 struct device_attribute *attr, char *buf) \
288{ \ 292{ \
289 struct usb_device *udev; \ 293 struct usb_device *udev; \
290 int len; \ 294 int len; \
@@ -364,7 +368,8 @@ static DEVICE_ATTR(maxchild, S_IRUGO, show_maxchild, NULL);
364/* Descriptor fields */ 368/* Descriptor fields */
365#define usb_descriptor_attr_le16(field, format_string) \ 369#define usb_descriptor_attr_le16(field, format_string) \
366static ssize_t \ 370static ssize_t \
367show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ 371show_##field (struct device *dev, struct device_attribute *attr, \
372 char *buf) \
368{ \ 373{ \
369 struct usb_device *udev; \ 374 struct usb_device *udev; \
370 \ 375 \
@@ -380,7 +385,8 @@ usb_descriptor_attr_le16(bcdDevice, "%04x\n")
380 385
381#define usb_descriptor_attr(field, format_string) \ 386#define usb_descriptor_attr(field, format_string) \
382static ssize_t \ 387static ssize_t \
383show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ 388show_##field (struct device *dev, struct device_attribute *attr, \
389 char *buf) \
384{ \ 390{ \
385 struct usb_device *udev; \ 391 struct usb_device *udev; \
386 \ 392 \
@@ -455,11 +461,13 @@ void usb_remove_sysfs_dev_files (struct usb_device *udev)
455/* Interface fields */ 461/* Interface fields */
456#define usb_intf_attr(field, format_string) \ 462#define usb_intf_attr(field, format_string) \
457static ssize_t \ 463static ssize_t \
458show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ 464show_##field (struct device *dev, struct device_attribute *attr, \
465 char *buf) \
459{ \ 466{ \
460 struct usb_interface *intf = to_usb_interface (dev); \ 467 struct usb_interface *intf = to_usb_interface (dev); \
461 \ 468 \
462 return sprintf (buf, format_string, intf->cur_altsetting->desc.field); \ 469 return sprintf (buf, format_string, \
470 intf->cur_altsetting->desc.field); \
463} \ 471} \
464static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL); 472static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
465 473
@@ -470,7 +478,8 @@ usb_intf_attr (bInterfaceClass, "%02x\n")
470usb_intf_attr (bInterfaceSubClass, "%02x\n") 478usb_intf_attr (bInterfaceSubClass, "%02x\n")
471usb_intf_attr (bInterfaceProtocol, "%02x\n") 479usb_intf_attr (bInterfaceProtocol, "%02x\n")
472 480
473static ssize_t show_interface_string(struct device *dev, struct device_attribute *attr, char *buf) 481static ssize_t show_interface_string(struct device *dev,
482 struct device_attribute *attr, char *buf)
474{ 483{
475 struct usb_interface *intf; 484 struct usb_interface *intf;
476 struct usb_device *udev; 485 struct usb_device *udev;
@@ -487,7 +496,8 @@ static ssize_t show_interface_string(struct device *dev, struct device_attribute
487} 496}
488static DEVICE_ATTR(interface, S_IRUGO, show_interface_string, NULL); 497static DEVICE_ATTR(interface, S_IRUGO, show_interface_string, NULL);
489 498
490static ssize_t show_modalias(struct device *dev, struct device_attribute *attr, char *buf) 499static ssize_t show_modalias(struct device *dev,
500 struct device_attribute *attr, char *buf)
491{ 501{
492 struct usb_interface *intf; 502 struct usb_interface *intf;
493 struct usb_device *udev; 503 struct usb_device *udev;