Skip to content

Commit

Permalink
usb: gadget: protect gadget_chips.h from been included twice
Browse files Browse the repository at this point in the history
Without it, we might have trouble when trying to write
some composite gadget drivers.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Aug 14, 2008
1 parent b9a097f commit e67d70f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/usb/gadget/gadget_chips.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
* Some are available on 2.4 kernels; several are available, but not
* yet pushed in the 2.6 mainline tree.
*/

#ifndef __GADGET_CHIPS_H
#define __GADGET_CHIPS_H

#ifdef CONFIG_USB_GADGET_NET2280
#define gadget_is_net2280(g) !strcmp("net2280", (g)->name)
#else
Expand Down Expand Up @@ -237,3 +241,5 @@ static inline bool gadget_supports_altsettings(struct usb_gadget *gadget)
/* Everything else is *presumably* fine ... */
return true;
}

#endif /* __GADGET_CHIPS_H */

0 comments on commit e67d70f

Please sign in to comment.