aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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 /include/linux
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 'include/linux')
-rw-r--r--include/linux/usb.h132
1 files changed, 86 insertions, 46 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 465ff4585ca5..c500d6b5a16d 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -137,7 +137,8 @@ struct usb_interface {
137 * active alternate setting */ 137 * active alternate setting */
138 unsigned num_altsetting; /* number of alternate settings */ 138 unsigned num_altsetting; /* number of alternate settings */
139 139
140 int minor; /* minor number this interface is bound to */ 140 int minor; /* minor number this interface is
141 * bound to */
141 enum usb_interface_condition condition; /* state of binding */ 142 enum usb_interface_condition condition; /* state of binding */
142 struct device dev; /* interface specific device info */ 143 struct device dev; /* interface specific device info */
143 struct class_device *class_dev; 144 struct class_device *class_dev;
@@ -249,7 +250,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,
249 __usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,\ 250 __usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,\
250 type,(void**)ptr) 251 type,(void**)ptr)
251 252
252/* -------------------------------------------------------------------------- */ 253/* ----------------------------------------------------------------------- */
253 254
254struct usb_operations; 255struct usb_operations;
255 256
@@ -269,7 +270,8 @@ struct usb_bus {
269 unsigned is_b_host:1; /* true during some HNP roleswitches */ 270 unsigned is_b_host:1; /* true during some HNP roleswitches */
270 unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ 271 unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
271 272
272 int devnum_next; /* Next open device number in round-robin allocation */ 273 int devnum_next; /* Next open device number in
274 * round-robin allocation */
273 275
274 struct usb_devmap devmap; /* device address allocation map */ 276 struct usb_devmap devmap; /* device address allocation map */
275 struct usb_operations *op; /* Operations (specific to the HC) */ 277 struct usb_operations *op; /* Operations (specific to the HC) */
@@ -290,15 +292,16 @@ struct usb_bus {
290 struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ 292 struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */
291 293
292 struct class_device *class_dev; /* class device for this bus */ 294 struct class_device *class_dev; /* class device for this bus */
293 struct kref kref; /* handles reference counting this bus */ 295 struct kref kref; /* reference counting for this bus */
294 void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ 296 void (*release)(struct usb_bus *bus);
297
295#if defined(CONFIG_USB_MON) 298#if defined(CONFIG_USB_MON)
296 struct mon_bus *mon_bus; /* non-null when associated */ 299 struct mon_bus *mon_bus; /* non-null when associated */
297 int monitored; /* non-zero when monitored */ 300 int monitored; /* non-zero when monitored */
298#endif 301#endif
299}; 302};
300 303
301/* -------------------------------------------------------------------------- */ 304/* ----------------------------------------------------------------------- */
302 305
303/* This is arbitrary. 306/* This is arbitrary.
304 * From USB 2.0 spec Table 11-13, offset 7, a hub can 307 * From USB 2.0 spec Table 11-13, offset 7, a hub can
@@ -327,7 +330,8 @@ struct usb_device {
327 330
328 struct semaphore serialize; 331 struct semaphore serialize;
329 332
330 unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */ 333 unsigned int toggle[2]; /* one bit for each endpoint
334 * ([0] = IN, [1] = OUT) */
331 335
332 struct usb_device *parent; /* our hub, unless we're the root */ 336 struct usb_device *parent; /* our hub, unless we're the root */
333 struct usb_bus *bus; /* Bus we're part of */ 337 struct usb_bus *bus; /* Bus we're part of */
@@ -344,7 +348,7 @@ struct usb_device {
344 348
345 char **rawdescriptors; /* Raw descriptors for each config */ 349 char **rawdescriptors; /* Raw descriptors for each config */
346 350
347 int have_langid; /* whether string_langid is valid yet */ 351 int have_langid; /* whether string_langid is valid */
348 int string_langid; /* language ID for strings */ 352 int string_langid; /* language ID for strings */
349 353
350 char *product; 354 char *product;
@@ -441,22 +445,31 @@ extern struct usb_host_interface *usb_altnum_to_altsetting(
441 * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are 445 * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are
442 * high speed, and a different one if they are full or low speed. 446 * high speed, and a different one if they are full or low speed.
443 */ 447 */
444static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) 448static inline int usb_make_path (struct usb_device *dev, char *buf,
449 size_t size)
445{ 450{
446 int actual; 451 int actual;
447 actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name, dev->devpath); 452 actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name,
453 dev->devpath);
448 return (actual >= (int)size) ? -1 : actual; 454 return (actual >= (int)size) ? -1 : actual;
449} 455}
450 456
451/*-------------------------------------------------------------------------*/ 457/*-------------------------------------------------------------------------*/
452 458
453#define USB_DEVICE_ID_MATCH_DEVICE (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) 459#define USB_DEVICE_ID_MATCH_DEVICE \
454#define USB_DEVICE_ID_MATCH_DEV_RANGE (USB_DEVICE_ID_MATCH_DEV_LO | USB_DEVICE_ID_MATCH_DEV_HI) 460 (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT)
455#define USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_RANGE) 461#define USB_DEVICE_ID_MATCH_DEV_RANGE \
462 (USB_DEVICE_ID_MATCH_DEV_LO | USB_DEVICE_ID_MATCH_DEV_HI)
463#define USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
464 (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_RANGE)
456#define USB_DEVICE_ID_MATCH_DEV_INFO \ 465#define USB_DEVICE_ID_MATCH_DEV_INFO \
457 (USB_DEVICE_ID_MATCH_DEV_CLASS | USB_DEVICE_ID_MATCH_DEV_SUBCLASS | USB_DEVICE_ID_MATCH_DEV_PROTOCOL) 466 (USB_DEVICE_ID_MATCH_DEV_CLASS | \
467 USB_DEVICE_ID_MATCH_DEV_SUBCLASS | \
468 USB_DEVICE_ID_MATCH_DEV_PROTOCOL)
458#define USB_DEVICE_ID_MATCH_INT_INFO \ 469#define USB_DEVICE_ID_MATCH_INT_INFO \
459 (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS | USB_DEVICE_ID_MATCH_INT_PROTOCOL) 470 (USB_DEVICE_ID_MATCH_INT_CLASS | \
471 USB_DEVICE_ID_MATCH_INT_SUBCLASS | \
472 USB_DEVICE_ID_MATCH_INT_PROTOCOL)
460 473
461/** 474/**
462 * USB_DEVICE - macro used to describe a specific usb device 475 * USB_DEVICE - macro used to describe a specific usb device
@@ -467,9 +480,11 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
467 * specific device. 480 * specific device.
468 */ 481 */
469#define USB_DEVICE(vend,prod) \ 482#define USB_DEVICE(vend,prod) \
470 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = (vend), .idProduct = (prod) 483 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = (vend), \
484 .idProduct = (prod)
471/** 485/**
472 * USB_DEVICE_VER - macro used to describe a specific usb device with a version range 486 * USB_DEVICE_VER - macro used to describe a specific usb device with a
487 * version range
473 * @vend: the 16 bit USB Vendor ID 488 * @vend: the 16 bit USB Vendor ID
474 * @prod: the 16 bit USB Product ID 489 * @prod: the 16 bit USB Product ID
475 * @lo: the bcdDevice_lo value 490 * @lo: the bcdDevice_lo value
@@ -479,7 +494,9 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
479 * specific device, with a version range. 494 * specific device, with a version range.
480 */ 495 */
481#define USB_DEVICE_VER(vend,prod,lo,hi) \ 496#define USB_DEVICE_VER(vend,prod,lo,hi) \
482 .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION, .idVendor = (vend), .idProduct = (prod), .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) 497 .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION, \
498 .idVendor = (vend), .idProduct = (prod), \
499 .bcdDevice_lo = (lo), .bcdDevice_hi = (hi)
483 500
484/** 501/**
485 * USB_DEVICE_INFO - macro used to describe a class of usb devices 502 * USB_DEVICE_INFO - macro used to describe a class of usb devices
@@ -491,7 +508,8 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
491 * specific class of devices. 508 * specific class of devices.
492 */ 509 */
493#define USB_DEVICE_INFO(cl,sc,pr) \ 510#define USB_DEVICE_INFO(cl,sc,pr) \
494 .match_flags = USB_DEVICE_ID_MATCH_DEV_INFO, .bDeviceClass = (cl), .bDeviceSubClass = (sc), .bDeviceProtocol = (pr) 511 .match_flags = USB_DEVICE_ID_MATCH_DEV_INFO, .bDeviceClass = (cl), \
512 .bDeviceSubClass = (sc), .bDeviceProtocol = (pr)
495 513
496/** 514/**
497 * USB_INTERFACE_INFO - macro used to describe a class of usb interfaces 515 * USB_INTERFACE_INFO - macro used to describe a class of usb interfaces
@@ -503,9 +521,10 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
503 * specific class of interfaces. 521 * specific class of interfaces.
504 */ 522 */
505#define USB_INTERFACE_INFO(cl,sc,pr) \ 523#define USB_INTERFACE_INFO(cl,sc,pr) \
506 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) 524 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \
525 .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr)
507 526
508/* -------------------------------------------------------------------------- */ 527/* ----------------------------------------------------------------------- */
509 528
510/** 529/**
511 * struct usb_driver - identifies USB driver to usbcore 530 * struct usb_driver - identifies USB driver to usbcore
@@ -558,7 +577,8 @@ struct usb_driver {
558 577
559 void (*disconnect) (struct usb_interface *intf); 578 void (*disconnect) (struct usb_interface *intf);
560