summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/gadget_chips.h
diff options
context:
space:
mode:
authorVitaly Kuzmichev <vkuzmichev@mvista.com>2010-09-13 18:37:11 +0400
committerRemy Bohmer <linux@bohmer.net>2010-09-20 21:57:17 +0200
commit6142e0ae0fcf8bf5a7a8d785061197ace8955cb6 (patch)
tree0481685eaf9ce2bb8a7964ca0e3321fa67c02b0e /drivers/usb/gadget/gadget_chips.h
parenta170f2c7973728f2e9e1b66214b0c14062c78398 (diff)
downloadu-boot-6142e0ae0fcf8bf5a7a8d785061197ace8955cb6.tar.gz
u-boot-6142e0ae0fcf8bf5a7a8d785061197ace8955cb6.tar.xz
u-boot-6142e0ae0fcf8bf5a7a8d785061197ace8955cb6.zip
USB-CDC: Fix coding style issues
Fixes most of checkpatch warnings and errors in USB gadget stack. The most frequently encountered problems are: 1) "(foo*)", "foo * bar", "foo* bar" 2) C99 // comments 3) No spaces before/after/around '?', ':', '=', '==', ',', '&', '(' 4) Spaces before '[' 5) Spaces between function names and '(' 6) Block braces in wrong places 7) Spaces before tabs 8) Macros with complex values not enclosed in parenthesis 9) Multiline comments start just after /* Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Diffstat (limited to 'drivers/usb/gadget/gadget_chips.h')
-rw-r--r--drivers/usb/gadget/gadget_chips.h51
1 files changed, 26 insertions, 25 deletions
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index 480bc87698..9bb7e2e77a 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -15,109 +15,109 @@
* Remy Bohmer <linux@bohmer.net>
*/
#ifdef CONFIG_USB_GADGET_NET2280
-#define gadget_is_net2280(g) !strcmp("net2280", (g)->name)
+#define gadget_is_net2280(g) (!strcmp("net2280", (g)->name))
#else
#define gadget_is_net2280(g) 0
#endif
#ifdef CONFIG_USB_GADGET_AMD5536UDC
-#define gadget_is_amd5536udc(g) !strcmp("amd5536udc", (g)->name)
+#define gadget_is_amd5536udc(g) (!strcmp("amd5536udc", (g)->name))
#else
#define gadget_is_amd5536udc(g) 0
#endif
#ifdef CONFIG_USB_GADGET_DUMMY_HCD
-#define gadget_is_dummy(g) !strcmp("dummy_udc", (g)->name)
+#define gadget_is_dummy(g) (!strcmp("dummy_udc", (g)->name))
#else
#define gadget_is_dummy(g) 0
#endif
#ifdef CONFIG_USB_GADGET_PXA2XX
-#define gadget_is_pxa(g) !strcmp("pxa2xx_udc", (g)->name)
+#define gadget_is_pxa(g) (!strcmp("pxa2xx_udc", (g)->name))
#else
#define gadget_is_pxa(g) 0
#endif
#ifdef CONFIG_USB_GADGET_GOKU
-#define gadget_is_goku(g) !strcmp("goku_udc", (g)->name)
+#define gadget_is_goku(g) (!strcmp("goku_udc", (g)->name))
#else
#define gadget_is_goku(g) 0
#endif
/* SH3 UDC -- not yet ported 2.4 --> 2.6 */
#ifdef CONFIG_USB_GADGET_SUPERH
-#define gadget_is_sh(g) !strcmp("sh_udc", (g)->name)
+#define gadget_is_sh(g) (!strcmp("sh_udc", (g)->name))
#else
#define gadget_is_sh(g) 0
#endif
/* not yet stable on 2.6 (would help "original Zaurus") */
#ifdef CONFIG_USB_GADGET_SA1100
-#define gadget_is_sa1100(g) !strcmp("sa1100_udc", (g)->name)
+#define gadget_is_sa1100(g) (!strcmp("sa1100_udc", (g)->name))
#else
#define gadget_is_sa1100(g) 0
#endif
#ifdef CONFIG_USB_GADGET_LH7A40X
-#define gadget_is_lh7a40x(g) !strcmp("lh7a40x_udc", (g)->name)
+#define gadget_is_lh7a40x(g) (!strcmp("lh7a40x_udc", (g)->name))
#else
#define gadget_is_lh7a40x(g) 0
#endif
/* handhelds.org tree (?) */
#ifdef CONFIG_USB_GADGET_MQ11XX
-#define gadget_is_mq11xx(g) !strcmp("mq11xx_udc", (g)->name)
+#define gadget_is_mq11xx(g) (!strcmp("mq11xx_udc", (g)->name))
#else
#define gadget_is_mq11xx(g) 0
#endif
#ifdef CONFIG_USB_GADGET_OMAP
-#define gadget_is_omap(g) !strcmp("omap_udc", (g)->name)
+#define gadget_is_omap(g) (!strcmp("omap_udc", (g)->name))
#else
#define gadget_is_omap(g) 0
#endif
/* not yet ported 2.4 --> 2.6 */
#ifdef CONFIG_USB_GADGET_N9604
-#define gadget_is_n9604(g) !strcmp("n9604_udc", (g)->name)
+#define gadget_is_n9604(g) (!strcmp("n9604_udc", (g)->name))
#else
#define gadget_is_n9604(g) 0
#endif
/* various unstable versions available */
#ifdef CONFIG_USB_GADGET_PXA27X
-#define gadget_is_pxa27x(g) !strcmp("pxa27x_udc", (g)->name)
+#define gadget_is_pxa27x(g) (!strcmp("pxa27x_udc", (g)->name))
#else
#define gadget_is_pxa27x(g) 0
#endif
#ifdef CONFIG_USB_GADGET_ATMEL_USBA
-#define gadget_is_atmel_usba(g) !strcmp("atmel_usba_udc", (g)->name)
+#define gadget_is_atmel_usba(g) (!strcmp("atmel_usba_udc", (g)->name))
#else
#define gadget_is_atmel_usba(g) 0
#endif
#ifdef CONFIG_USB_GADGET_S3C2410
-#define gadget_is_s3c2410(g) !strcmp("s3c2410_udc", (g)->name)
+#define gadget_is_s3c2410(g) (!strcmp("s3c2410_udc", (g)->name))
#else
#define gadget_is_s3c2410(g) 0
#endif
#ifdef CONFIG_USB_GADGET_AT91
-#define gadget_is_at91(g) !strcmp("at91_udc", (g)->name)
+#define gadget_is_at91(g) (!strcmp("at91_udc", (g)->name))
#else
#define gadget_is_at91(g) 0
#endif
/* status unclear */
#ifdef CONFIG_USB_GADGET_IMX
-#define gadget_is_imx(g) !strcmp("imx_udc", (g)->name)
+#define gadget_is_imx(g) (!strcmp("imx_udc", (g)->name))
#else
#define gadget_is_imx(g) 0
#endif
#ifdef CONFIG_USB_GADGET_FSL_USB2
-#define gadget_is_fsl_usb2(g) !strcmp("fsl-usb2-udc", (g)->name)
+#define gadget_is_fsl_usb2(g) (!strcmp("fsl-usb2-udc", (g)->name))
#else
#define gadget_is_fsl_usb2(g) 0
#endif
@@ -125,36 +125,37 @@
/* Mentor high speed function controller */
/* from Montavista kernel (?) */
#ifdef CONFIG_USB_GADGET_MUSBHSFC
-#define gadget_is_musbhsfc(g) !strcmp("musbhsfc_udc", (g)->name)
+#define gadget_is_musbhsfc(g) (!strcmp("musbhsfc_udc", (g)->name))
#else
#define gadget_is_musbhsfc(g) 0
#endif
/* Mentor high speed "dual role" controller, in peripheral role */
#ifdef CONFIG_USB_GADGET_MUSB_HDRC
-#define gadget_is_musbhdrc(g) !strcmp("musb_hdrc", (g)->name)
+#define gadget_is_musbhdrc(g) (!strcmp("musb_hdrc", (g)->name))
#else
#define gadget_is_musbhdrc(g) 0
#endif
/* from Montavista kernel (?) */
#ifdef CONFIG_USB_GADGET_MPC8272
-#define gadget_is_mpc8272(g) !strcmp("mpc8272_udc", (g)->name)
+#define gadget_is_mpc8272(g) (!strcmp("mpc8272_udc", (g)->name))
#else
#define gadget_is_mpc8272(g) 0
#endif
#ifdef CONFIG_USB_GADGET_M66592
-#define gadget_is_m66592(g) !strcmp("m66592_udc", (g)->name)
+#define gadget_is_m66592(g) (!strcmp("m66592_udc", (g)->name))
#else
#define gadget_is_m66592(g) 0
#endif
-// CONFIG_USB_GADGET_SX2
-// CONFIG_USB_GADGET_AU1X00
-// ...
-
+/*
+ * CONFIG_USB_GADGET_SX2
+ * CONFIG_USB_GADGET_AU1X00
+ * ...
+ */
/**
* usb_gadget_controller_number - support bcdDevice id convention