On Mon, 13 Jun 2011, Felipe Balbi wrote: > in fact, gadget_is_*() are only used during bind(), so we don't really > need the ifdef trickery as it's quite small optimization, this means we > can: > +#define gadget_is_net2280(g) (!strcmp("net2280", (g)->name)) > +#define gadget_is_amd5536udc(g) (!strcmp("amd5536udc", (g)->name)) > +#define gadget_is_dummy(g) (!strcmp("dummy_udc", (g)->name)) > +#define gadget_is_pxa(g) (!strcmp("pxa25x_udc", (g)->name)) > +#define gadget_is_goku(g) (!strcmp("goku_udc", (g)->name)) > +#define gadget_is_omap(g) (!strcmp("omap_udc", (g)->name)) > +#define gadget_is_pxa27x(g) (!strcmp("pxa27x_udc", (g)->name)) > +#define gadget_is_atmel_usba(g) (!strcmp("atmel_usba_udc", (g)->name)) > +#define gadget_is_s3c2410(g) (!strcmp("s3c2410_udc", (g)->name)) > +#define gadget_is_at91(g) (!strcmp("at91_udc", (g)->name)) > +#define gadget_is_imx(g) (!strcmp("imx_udc", (g)->name)) > +#define gadget_is_fsl_usb2(g) (!strcmp("fsl-usb2-udc", (g)->name)) > +#define gadget_is_musbhdrc(g) (!strcmp("musb-hdrc", (g)->name)) > +#define gadget_is_langwell(g) (!strcmp("langwell_udc", (g)->name)) > +#define gadget_is_m66592(g) (!strcmp("m66592_udc", (g)->name)) > +#define gadget_is_fsl_qe(g) (!strcmp("fsl_qe_udc", (g)->name)) > #define gadget_is_ci13xxx_pci(g) (!strcmp("ci13xxx_pci", (g)->name)) ... Makes sense. I don't know of any code that uses a significant number of these tests. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html