aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2008-03-07 13:45:32 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:42 -0400
commitdda43a0e03a33dd716fb34f812b1af614f74daff (patch)
tree883769ddf738b9f888cc4411dfa11cf26e8f605b /include
parentf66396b55d4016bdc7a5298db7a681c63b649bf4 (diff)
USB: Standardize inclusion protection and add where missing.
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/audio.h2
-rw-r--r--include/linux/usb/cdc.h4
-rw-r--r--include/linux/usb/ch9.h2
-rw-r--r--include/linux/usb/g_printer.h4
-rw-r--r--include/linux/usb/gadget.h2
-rw-r--r--include/linux/usb/gadgetfs.h16
-rw-r--r--include/linux/usb/input.h8
-rw-r--r--include/linux/usb/iowarrior.h6
-rw-r--r--include/linux/usb/isp116x.h6
-rw-r--r--include/linux/usb/midi.h2
-rw-r--r--include/linux/usb/net2280.h9
-rw-r--r--include/linux/usb/otg.h6
-rw-r--r--include/linux/usb/quirks.h5
-rw-r--r--include/linux/usb/rndis_host.h9
-rw-r--r--include/linux/usb/serial.h3
-rw-r--r--include/linux/usb/sl811.h5
-rw-r--r--include/linux/usb/usbnet.h8
17 files changed, 57 insertions, 40 deletions
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h
index 2dfeef16b221..8cb025fef634 100644
--- a/include/linux/usb/audio.h
+++ b/include/linux/usb/audio.h
@@ -50,4 +50,4 @@ struct usb_ac_header_descriptor_##n { \
50 __u8 baInterfaceNr[n]; \ 50 __u8 baInterfaceNr[n]; \
51} __attribute__ ((packed)) 51} __attribute__ ((packed))
52 52
53#endif 53#endif /* __LINUX_USB_AUDIO_H */
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h
index 94ee4ecf0564..71e52f2f6a38 100644
--- a/include/linux/usb/cdc.h
+++ b/include/linux/usb/cdc.h
@@ -6,6 +6,9 @@
6 * firmware based USB peripherals. 6 * firmware based USB peripherals.
7 */ 7 */
8 8
9#ifndef __LINUX_USB_CDC_H
10#define __LINUX_USB_CDC_H
11
9#define USB_CDC_SUBCLASS_ACM 0x02 12#define USB_CDC_SUBCLASS_ACM 0x02
10#define USB_CDC_SUBCLASS_ETHERNET 0x06 13#define USB_CDC_SUBCLASS_ETHERNET 0x06
11#define USB_CDC_SUBCLASS_WHCM 0x08 14#define USB_CDC_SUBCLASS_WHCM 0x08
@@ -221,3 +224,4 @@ struct usb_cdc_notification {
221 __le16 wLength; 224 __le16 wLength;
222} __attribute__ ((packed)); 225} __attribute__ ((packed));
223 226
227#endif /* __LINUX_USB_CDC_H */
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 61fcbc2b97da..7e0d3084f76c 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -586,4 +586,4 @@ enum usb_device_state {
586 */ 586 */
587}; 587};
588 588
589#endif /* __LINUX_USB_CH9_H */ 589#endif /* __LINUX_USB_CH9_H */
diff --git a/include/linux/usb/g_printer.h b/include/linux/usb/g_printer.h
index 0c5ea1e3eb98..6178fde50f74 100644
--- a/include/linux/usb/g_printer.h
+++ b/include/linux/usb/g_printer.h
@@ -18,6 +18,8 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#ifndef __LINUX_USB_G_PRINTER_H
22#define __LINUX_USB_G_PRINTER_H
21 23
22#define PRINTER_NOT_ERROR 0x08 24#define PRINTER_NOT_ERROR 0x08
23#define PRINTER_SELECTED 0x10 25#define PRINTER_SELECTED 0x10
@@ -29,3 +31,5 @@
29 */ 31 */
30#define GADGET_GET_PRINTER_STATUS _IOR('g', 0x21, unsigned char) 32#define GADGET_GET_PRINTER_STATUS _IOR('g', 0x21, unsigned char)
31#define GADGET_SET_PRINTER_STATUS _IOWR('g', 0x22, unsigned char) 33#define GADGET_SET_PRINTER_STATUS _IOWR('g', 0x22, unsigned char)
34
35#endif /* __LINUX_USB_G_PRINTER_H */
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index f3295296b435..d8128f7102c9 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -846,4 +846,4 @@ extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,
846 846
847extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; 847extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit;
848 848
849#endif /* __LINUX_USB_GADGET_H */ 849#endif /* __LINUX_USB_GADGET_H */
diff --git a/include/linux/usb/gadgetfs.h b/include/linux/usb/gadgetfs.h
index c291ab1af747..ea45f265ec05 100644
--- a/include/linux/usb/gadgetfs.h
+++ b/include/linux/usb/gadgetfs.h
@@ -1,11 +1,3 @@
1#ifndef __LINUX_USB_GADGETFS_H
2#define __LINUX_USB_GADGETFS_H
3
4#include <asm/types.h>
5#include <asm/ioctl.h>
6
7#include <linux/usb/ch9.h>
8
9/* 1/*
10 * Filesystem based user-mode API to USB Gadget controller hardware 2 * Filesystem based user-mode API to USB Gadget controller hardware
11 * 3 *
@@ -23,6 +15,14 @@
23 * then performing data transfers by reading or writing. 15 * then performing data transfers by reading or writing.
24 */ 16 */
25 17
18#ifndef __LINUX_USB_GADGETFS_H
19#define __LINUX_USB_GADGETFS_H
20
21#include <asm/types.h>
22#include <asm/ioctl.h>
23
24#include <linux/usb/ch9.h>
25
26/* 26/*
27 * Events are delivered on the ep0 file descriptor, when the user mode driver 27 * Events are delivered on the ep0 file descriptor, when the user mode driver
28 * reads from this file descriptor after writing the descriptors. Don't 28 * reads from this file descriptor after writing the descriptors. Don't
diff --git a/include/linux/usb/input.h b/include/linux/usb/input.h
index 716e0cc16043..0e010b220e85 100644
--- a/include/linux/usb/input.h
+++ b/include/linux/usb/input.h
@@ -1,6 +1,3 @@
1#ifndef __USB_INPUT_H
2#define __USB_INPUT_H
3
4/* 1/*
5 * Copyright (C) 2005 Dmitry Torokhov 2 * Copyright (C) 2005 Dmitry Torokhov
6 * 3 *
@@ -9,6 +6,9 @@
9 * the Free Software Foundation. 6 * the Free Software Foundation.
10 */ 7 */
11 8
9#ifndef __LINUX_USB_INPUT_H
10#define __LINUX_USB_INPUT_H
11
12#include <linux/usb.h> 12#include <linux/usb.h>
13#include <linux/input.h> 13#include <linux/input.h>
14#include <asm/byteorder.h> 14#include <asm/byteorder.h>
@@ -22,4 +22,4 @@ usb_to_input_id(const struct usb_device *dev, struct input_id *id)
22 id->version = le16_to_cpu(dev->descriptor.bcdDevice); 22 id->version = le16_to_cpu(dev->descriptor.bcdDevice);
23} 23}
24 24
25#endif 25#endif /* __LINUX_USB_INPUT_H */
diff --git a/include/linux/usb/iowarrior.h b/include/linux/usb/iowarrior.h
index de6f380e17a2..4fd6513d564c 100644
--- a/include/linux/usb/iowarrior.h
+++ b/include/linux/usb/iowarrior.h
@@ -1,5 +1,5 @@
1#ifndef _IOWARRIOR_H_ 1#ifndef __LINUX_USB_IOWARRIOR_H
2#define _IOWARRIOR_H_ 2#define __LINUX_USB_IOWARRIOR_H
3 3
4#define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */ 4#define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */
5 5
@@ -39,4 +39,4 @@ struct iowarrior_info {
39*/ 39*/
40#define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info) 40#define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info)
41 41
42#endif /* _IOWARRIOR_H_ */ 42#endif /* __LINUX_USB_IOWARRIOR_H */
diff --git a/include/linux/usb/isp116x.h b/include/linux/usb/isp116x.h
index 67d2826f34fe..96ca114e88d0 100644
--- a/include/linux/usb/isp116x.h
+++ b/include/linux/usb/isp116x.h
@@ -1,9 +1,11 @@
1
2/* 1/*
3 * Board initialization code should put one of these into dev->platform_data 2 * Board initialization code should put one of these into dev->platform_data
4 * and place the isp116x onto platform_bus. 3 * and place the isp116x onto platform_bus.
5 */ 4 */
6 5
6#ifndef __LINUX_USB_ISP116X_H
7#define __LINUX_USB_ISP116X_H
8
7struct isp116x_platform_data { 9struct isp116x_platform_data {
8 /* Enable internal resistors on downstream ports */ 10 /* Enable internal resistors on downstream ports */
9 unsigned sel15Kres:1; 11 unsigned sel15Kres:1;
@@ -27,3 +29,5 @@ struct isp116x_platform_data {
27 */ 29 */
28 void (*delay) (struct device *dev, int delay); 30 void (*delay) (struct device *dev, int delay);
29}; 31};
32
33#endif /* __LINUX_USB_ISP116X_H */
diff --git a/include/linux/usb/midi.h b/include/linux/usb/midi.h
index 80624c562921..1d1040865661 100644
--- a/include/linux/usb/midi.h
+++ b/include/linux/usb/midi.h
@@ -109,4 +109,4 @@ struct usb_ms_endpoint_descriptor_##n { \
109 __u8 baAssocJackID[n]; \ 109 __u8 baAssocJackID[n]; \
110} __attribute__ ((packed)) 110} __attribute__ ((packed))
111 111
112#endif 112#endif /* __LINUX_USB_MIDI_H */
diff --git a/include/linux/usb/net2280.h b/include/linux/usb/net2280.h
index ec897cb844ab..96ca549a778d 100644
--- a/include/linux/usb/net2280.h
+++ b/include/linux/usb/net2280.h
@@ -1,11 +1,7 @@
1/* 1/*
2 * NetChip 2280 high/full speed USB device controller. 2 * NetChip 2280 high/full speed USB device controller.
3 * Unlike many such controllers, this one talks PCI. 3 * Unlike many such controllers, this one talks PCI.
4 */ 4 *
5#ifndef __LINUX_USB_NET2280_H
6#define __LINUX_USB_NET2280_H
7
8/*
9 * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com) 5 * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com)
10 * Copyright (C) 2003 David Brownell 6 * Copyright (C) 2003 David Brownell
11 * 7 *
@@ -24,6 +20,9 @@
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */ 21 */
26 22
23#ifndef __LINUX_USB_NET2280_H
24#define __LINUX_USB_NET2280_H
25
27/*-------------------------------------------------------------------------*/ 26/*-------------------------------------------------------------------------*/
28 27
29/* NET2280 MEMORY MAPPED REGISTERS 28/* NET2280 MEMORY MAPPED REGISTERS
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index e007074ebe41..1db25d152ad8 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -1,11 +1,13 @@
1/* USB OTG (On The Go) defines */ 1/* USB OTG (On The Go) defines */
2
3/* 2/*
3 *
4 * These APIs may be used between USB controllers. USB device drivers 4 * These APIs may be used between USB controllers. USB device drivers
5 * (for either host or peripheral roles) don't use these calls; they 5 * (for either host or peripheral roles) don't use these calls; they
6 * continue to use just usb_device and usb_gadget. 6 * continue to use just usb_device and usb_gadget.
7 */ 7 */
8 8
9#ifndef __LINUX_USB_OTG_H
10#define __LINUX_USB_OTG_H
9 11
10/* OTG defines lots of enumeration states before device reset */ 12/* OTG defines lots of enumeration states before device reset */
11enum usb_otg_state { 13enum usb_otg_state {
@@ -129,3 +131,5 @@ otg_start_srp(struct otg_transceiver *otg)
129 131
130/* for OTG controller drivers (and maybe other stuff) */ 132/* for OTG controller drivers (and maybe other stuff) */
131extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); 133extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num);
134
135#endif /* __LINUX_USB_OTG_H */
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
index 1f999ec8d08c..7f6c603db654 100644
--- a/include/linux/usb/quirks.h
+++ b/include/linux/usb/quirks.h
@@ -4,6 +4,9 @@
4 * belong here. 4 * belong here.
5 */ 5 */
6 6
7#ifndef __LINUX_USB_QUIRKS_H
8#define __LINUX_USB_QUIRKS_H
9
7/* string descriptors must not be fetched using a 255-byte read */ 10/* string descriptors must not be fetched using a 255-byte read */
8#define USB_QUIRK_STRING_FETCH_255 0x00000001 11#define USB_QUIRK_STRING_FETCH_255 0x00000001
9 12
@@ -12,3 +15,5 @@
12 15
13/* device can't handle Set-Interface requests */ 16/* device can't handle Set-Interface requests */
14#define USB_QUIRK_NO_SET_INTF 0x00000004 17#define USB_QUIRK_NO_SET_INTF 0x00000004
18
19#endif /* __LINUX_USB_QUIRKS_H */
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h
index edc1d4a0e272..29d6458ecb8d 100644
--- a/include/linux/usb/rndis_host.h
+++ b/include/linux/usb/rndis_host.h
@@ -17,10 +17,8 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20 20#ifndef __LINUX_USB_RNDIS_HOST_H
21#ifndef __RNDIS_HOST_H 21#define __LINUX_USB_RNDIS_HOST_H
22#define __RNDIS_HOST_H
23
24 22
25/* 23/*
26 * CONTROL uses CDC "encapsulated commands" with funky notifications. 24 * CONTROL uses CDC "encapsulated commands" with funky notifications.
@@ -270,5 +268,4 @@ extern int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb);
270extern struct sk_buff * 268extern struct sk_buff *
271rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); 269rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags);
272 270
273#endif /* __RNDIS_HOST_H */ 271#endif /* __LINUX_USB_RNDIS_HOST_H */
274
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 21b4a1c6f585..f1b7434a96bf 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13
14#ifndef __LINUX_USB_SERIAL_H 13#ifndef __LINUX_USB_SERIAL_H
15#define __LINUX_USB_SERIAL_H 14#define __LINUX_USB_SERIAL_H
16 15
@@ -340,5 +339,5 @@ static inline void usb_serial_debug_data(int debug,
340 339
341 340
342 341
343#endif /* ifdef __LINUX_USB_SERIAL_H */ 342#endif /* __LINUX_USB_SERIAL_H */
344 343
diff --git a/include/linux/usb/sl811.h b/include/linux/usb/sl811.h
index 877373da410d..3afe4d16fcef 100644
--- a/include/linux/usb/sl811.h
+++ b/include/linux/usb/sl811.h
@@ -1,9 +1,11 @@
1
2/* 1/*
3 * board initialization should put one of these into dev->platform_data 2 * board initialization should put one of these into dev->platform_data
4 * and place the sl811hs onto platform_bus named "sl811-hcd". 3 * and place the sl811hs onto platform_bus named "sl811-hcd".
5 */ 4 */
6 5
6#ifndef __LINUX_USB_SL811_H
7#define __LINUX_USB_SL811_H
8
7struct sl811_platform_data { 9struct sl811_platform_data {
8 unsigned can_wakeup:1; 10 unsigned can_wakeup:1;
9 11
@@ -24,3 +26,4 @@ struct sl811_platform_data {
24 /* void (*clock_enable)(struct device *dev, int is_on); */ 26 /* void (*clock_enable)(struct device *dev, int is_on); */
25}; 27};
26 28
29#endif /* __LINUX_USB_SL811_H */
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index e0501da3dd11..ba09fe88adda 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -19,10 +19,8 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22 22#ifndef __LINUX_USB_USBNET_H
23#ifndef __USBNET_H 23#define __LINUX_USB_USBNET_H
24#define __USBNET_H
25
26 24
27/* interface from usbnet core to each USB networking link we handle */ 25/* interface from usbnet core to each USB networking link we handle */
28struct usbnet { 26struct usbnet {
@@ -211,4 +209,4 @@ extern int usbnet_nway_reset(struct net_device *net);
211 printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \ 209 printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \
212 210
213 211
214#endif /* __USBNET_H */ 212#endif /* __LINUX_USB_USBNET_H */