]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
USB: Standardize inclusion protection and add where missing.
authorRobert P. J. Day <rpjday@crashcourse.ca>
Fri, 7 Mar 2008 18:45:32 +0000 (13:45 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Apr 2008 04:16:42 +0000 (21:16 -0700)
For the header files in include/linux/usb, add missing multiple
inclusion protection and standardize what's already there.  The
apparent standards:

  * macro name of __LINUX_USB_headerfile_H
  * inclusion protection placed after leading comment block
  * macro name added as a comment on the final #endif
  * any obvious trivial whitespace cleanup associated with the above

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 files changed:
include/linux/usb/audio.h
include/linux/usb/cdc.h
include/linux/usb/ch9.h
include/linux/usb/g_printer.h
include/linux/usb/gadget.h
include/linux/usb/gadgetfs.h
include/linux/usb/input.h
include/linux/usb/iowarrior.h
include/linux/usb/isp116x.h
include/linux/usb/midi.h
include/linux/usb/net2280.h
include/linux/usb/otg.h
include/linux/usb/quirks.h
include/linux/usb/rndis_host.h
include/linux/usb/serial.h
include/linux/usb/sl811.h
include/linux/usb/usbnet.h

index 2dfeef16b221d4605f2090de430e4f196c9d8712..8cb025fef6346a63270cd55a8de69b3b93a49006 100644 (file)
@@ -50,4 +50,4 @@ struct usb_ac_header_descriptor_##n {                         \
        __u8  baInterfaceNr[n];                                 \
 } __attribute__ ((packed))
 
-#endif
+#endif /* __LINUX_USB_AUDIO_H */
index 94ee4ecf0564972750e2fba836cd70990d01101a..71e52f2f6a38686ff45e7a7f489e24a395dfbeb1 100644 (file)
@@ -6,6 +6,9 @@
  * firmware based USB peripherals.
  */
 
+#ifndef __LINUX_USB_CDC_H
+#define __LINUX_USB_CDC_H
+
 #define USB_CDC_SUBCLASS_ACM                   0x02
 #define USB_CDC_SUBCLASS_ETHERNET              0x06
 #define USB_CDC_SUBCLASS_WHCM                  0x08
@@ -221,3 +224,4 @@ struct usb_cdc_notification {
        __le16  wLength;
 } __attribute__ ((packed));
 
+#endif /* __LINUX_USB_CDC_H */
index 61fcbc2b97da09f6c431cec1bbe84bb22249a9a6..7e0d3084f76c8411aa5dad0b09772f840020b50a 100644 (file)
@@ -586,4 +586,4 @@ enum usb_device_state {
         */
 };
 
-#endif /* __LINUX_USB_CH9_H */
+#endif /* __LINUX_USB_CH9_H */
index 0c5ea1e3eb980fb11b276ca0377e593b25f362bd..6178fde50f7404d7639440b8445fa0043f6b1b1b 100644 (file)
@@ -18,6 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifndef __LINUX_USB_G_PRINTER_H
+#define __LINUX_USB_G_PRINTER_H
 
 #define PRINTER_NOT_ERROR      0x08
 #define PRINTER_SELECTED       0x10
@@ -29,3 +31,5 @@
  */
 #define GADGET_GET_PRINTER_STATUS      _IOR('g', 0x21, unsigned char)
 #define GADGET_SET_PRINTER_STATUS      _IOWR('g', 0x22, unsigned char)
+
+#endif /* __LINUX_USB_G_PRINTER_H */
index f3295296b4353a5305ca3ee947d80b7ac3e0932b..d8128f7102c92858bc01d71c7544882849318ae7 100644 (file)
@@ -846,4 +846,4 @@ extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,
 
 extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit;
 
-#endif /* __LINUX_USB_GADGET_H */
+#endif /* __LINUX_USB_GADGET_H */
index c291ab1af747a37953f7866fe6479dcef16a7877..ea45f265ec05221bc18b0ad687a15e721f53ed44 100644 (file)
@@ -1,11 +1,3 @@
-#ifndef __LINUX_USB_GADGETFS_H
-#define __LINUX_USB_GADGETFS_H
-
-#include <asm/types.h>
-#include <asm/ioctl.h>
-
-#include <linux/usb/ch9.h>
-
 /*
  * Filesystem based user-mode API to USB Gadget controller hardware
  *
  * then performing data transfers by reading or writing.
  */
 
+#ifndef __LINUX_USB_GADGETFS_H
+#define __LINUX_USB_GADGETFS_H
+
+#include <asm/types.h>
+#include <asm/ioctl.h>
+
+#include <linux/usb/ch9.h>
+
 /*
  * Events are delivered on the ep0 file descriptor, when the user mode driver
  * reads from this file descriptor after writing the descriptors.  Don't
index 716e0cc1604314b147bfe1b517b82930503e98f1..0e010b220e85b3f9ea861f2ab009809d17014910 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef __USB_INPUT_H
-#define __USB_INPUT_H
-
 /*
  * Copyright (C) 2005 Dmitry Torokhov
  *
@@ -9,6 +6,9 @@
  * the Free Software Foundation.
  */
 
+#ifndef __LINUX_USB_INPUT_H
+#define __LINUX_USB_INPUT_H
+
 #include <linux/usb.h>
 #include <linux/input.h>
 #include <asm/byteorder.h>
@@ -22,4 +22,4 @@ usb_to_input_id(const struct usb_device *dev, struct input_id *id)
        id->version = le16_to_cpu(dev->descriptor.bcdDevice);
 }
 
-#endif
+#endif /* __LINUX_USB_INPUT_H */
index de6f380e17a2bfac42059c40b41c69d3102222f9..4fd6513d564c7ccb1362d73a1aa45ba4ee05baaf 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _IOWARRIOR_H_
-#define _IOWARRIOR_H_
+#ifndef __LINUX_USB_IOWARRIOR_H
+#define __LINUX_USB_IOWARRIOR_H
 
 #define CODEMERCS_MAGIC_NUMBER 0xC0    /* like COde Mercenaries */
 
@@ -39,4 +39,4 @@ struct iowarrior_info {
 */
 #define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info)
 
-#endif  /* _IOWARRIOR_H_ */
+#endif /* __LINUX_USB_IOWARRIOR_H */
index 67d2826f34fe7795cc8bb37bf3ea4fa6ab7c1307..96ca114e88d0e1b843f1816c55c1bba310ee93ad 100644 (file)
@@ -1,9 +1,11 @@
-
 /*
  * Board initialization code should put one of these into dev->platform_data
  * and place the isp116x onto platform_bus.
  */
 
+#ifndef __LINUX_USB_ISP116X_H
+#define __LINUX_USB_ISP116X_H
+
 struct isp116x_platform_data {
        /* Enable internal resistors on downstream ports */
        unsigned sel15Kres:1;
@@ -27,3 +29,5 @@ struct isp116x_platform_data {
         */
        void (*delay) (struct device *dev, int delay);
 };
+
+#endif /* __LINUX_USB_ISP116X_H */
index 80624c562921e0fe2dc620ccbaad6e16f70eb7cb..1d10408656617b0657b8cba188ee6893681e688c 100644 (file)
@@ -109,4 +109,4 @@ struct usb_ms_endpoint_descriptor_##n {                             \
        __u8  baAssocJackID[n];                                 \
 } __attribute__ ((packed))
 
-#endif
+#endif /* __LINUX_USB_MIDI_H */
index ec897cb844ab5cd9a8dbda9be1b66a37cf8235c2..96ca549a778d62a22897451539efab0189303db0 100644 (file)
@@ -1,11 +1,7 @@
 /*
  * NetChip 2280 high/full speed USB device controller.
  * Unlike many such controllers, this one talks PCI.
- */
-#ifndef __LINUX_USB_NET2280_H
-#define __LINUX_USB_NET2280_H
-
-/*
+ *
  * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com)
  * Copyright (C) 2003 David Brownell
  *
@@ -24,6 +20,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifndef __LINUX_USB_NET2280_H
+#define __LINUX_USB_NET2280_H
+
 /*-------------------------------------------------------------------------*/
 
 /* NET2280 MEMORY MAPPED REGISTERS
index e007074ebe41f6b9648f62177cfa588b7bc13fcb..1db25d152ad86a351483f680251af8081de6fc0d 100644 (file)
@@ -1,11 +1,13 @@
 /* USB OTG (On The Go) defines */
-
 /*
+ *
  * These APIs may be used between USB controllers.  USB device drivers
  * (for either host or peripheral roles) don't use these calls; they
  * continue to use just usb_device and usb_gadget.
  */
 
+#ifndef __LINUX_USB_OTG_H
+#define __LINUX_USB_OTG_H
 
 /* OTG defines lots of enumeration states before device reset */
 enum usb_otg_state {
@@ -129,3 +131,5 @@ otg_start_srp(struct otg_transceiver *otg)
 
 /* for OTG controller drivers (and maybe other stuff) */
 extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num);
+
+#endif /* __LINUX_USB_OTG_H */
index 1f999ec8d08c520c431d626e3bf5372e890c51a3..7f6c603db654d077f4cd8ee8351c97e8f9957815 100644 (file)
@@ -4,6 +4,9 @@
  * belong here.
  */
 
+#ifndef __LINUX_USB_QUIRKS_H
+#define __LINUX_USB_QUIRKS_H
+
 /* string descriptors must not be fetched using a 255-byte read */
 #define USB_QUIRK_STRING_FETCH_255     0x00000001
 
@@ -12,3 +15,5 @@
 
 /* device can't handle Set-Interface requests */
 #define USB_QUIRK_NO_SET_INTF          0x00000004
+
+#endif /* __LINUX_USB_QUIRKS_H */
index edc1d4a0e272459a8c411c80c9d4855ec4a0163a..29d6458ecb8d88127af75d053cc286cba2e12d08 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-
-#ifndef        __RNDIS_HOST_H
-#define        __RNDIS_HOST_H
-
+#ifndef        __LINUX_USB_RNDIS_HOST_H
+#define        __LINUX_USB_RNDIS_HOST_H
 
 /*
  * CONTROL uses CDC "encapsulated commands" with funky notifications.
@@ -270,5 +268,4 @@ extern int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb);
 extern struct sk_buff *
 rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags);
 
-#endif /* __RNDIS_HOST_H */
-
+#endif /* __LINUX_USB_RNDIS_HOST_H */
index 21b4a1c6f5851f9c92998694afd0171602af880b..f1b7434a96bf56544a86fbf7d680f9e76b9bafa6 100644 (file)
@@ -10,7 +10,6 @@
  *
  */
 
-
 #ifndef __LINUX_USB_SERIAL_H
 #define __LINUX_USB_SERIAL_H
 
@@ -340,5 +339,5 @@ static inline void usb_serial_debug_data(int debug,
 
 
 
-#endif /* ifdef __LINUX_USB_SERIAL_H */
+#endif /* __LINUX_USB_SERIAL_H */
 
index 877373da410dcd0520cae0babe731188351fc637..3afe4d16fcef186d2c9f8b415b6c3c8b87c3ca2c 100644 (file)
@@ -1,9 +1,11 @@
-
 /*
  * board initialization should put one of these into dev->platform_data
  * and place the sl811hs onto platform_bus named "sl811-hcd".
  */
 
+#ifndef __LINUX_USB_SL811_H
+#define __LINUX_USB_SL811_H
+
 struct sl811_platform_data {
        unsigned        can_wakeup:1;
 
@@ -24,3 +26,4 @@ struct sl811_platform_data {
        /* void         (*clock_enable)(struct device *dev, int is_on); */
 };
 
+#endif /* __LINUX_USB_SL811_H */
index e0501da3dd115024b9b31b8d1f0d0bd139b3f19d..ba09fe88addaebc9d6ee07e5ef70baecae08d313 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-
-#ifndef        __USBNET_H
-#define        __USBNET_H
-
+#ifndef        __LINUX_USB_USBNET_H
+#define        __LINUX_USB_USBNET_H
 
 /* interface from usbnet core to each USB networking link we handle */
 struct usbnet {
@@ -211,4 +209,4 @@ extern int usbnet_nway_reset(struct net_device *net);
        printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \
 
 
-#endif /* __USBNET_H */
+#endif /* __LINUX_USB_USBNET_H */