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>
This commit is contained in:
Robert P. J. Day 2008-03-07 13:45:32 -05:00 committed by Greg Kroah-Hartman
parent f66396b55d
commit dda43a0e03
17 changed files with 57 additions and 40 deletions

View File

@ -50,4 +50,4 @@ struct usb_ac_header_descriptor_##n { \
__u8 baInterfaceNr[n]; \
} __attribute__ ((packed))
#endif
#endif /* __LINUX_USB_AUDIO_H */

View 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 */

View File

@ -586,4 +586,4 @@ enum usb_device_state {
*/
};
#endif /* __LINUX_USB_CH9_H */
#endif /* __LINUX_USB_CH9_H */

View 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 */

View 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 */

View 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
*
@ -23,6 +15,14 @@
* 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

View 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 */

View 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 */

View 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 */

View File

@ -109,4 +109,4 @@ struct usb_ms_endpoint_descriptor_##n { \
__u8 baAssocJackID[n]; \
} __attribute__ ((packed))
#endif
#endif /* __LINUX_USB_MIDI_H */

View 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

View 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 */

View 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 */

View File

@ -17,10 +17,8 @@
* 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 */

View 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 */

View 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 */

View File

@ -19,10 +19,8 @@
* 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 */