]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: gadget: add gadget controller number for s3c-hsotg driver
authorMaurus Cuelenaere <mcuelenaere@gmail.com>
Mon, 8 Mar 2010 17:20:59 +0000 (18:20 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Mar 2010 14:24:22 +0000 (07:24 -0700)
This prevents some drivers from complaining that no bcdDevice id was set.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/gadget_chips.h

index 1edbc12fff18fdc172cd44627fc8e7d397f0b46c..e511fec9f26d8d5f529d3a6a7ba7ae5a648aa24e 100644 (file)
 #define        gadget_is_r8a66597(g)   0
 #endif
 
+#ifdef CONFIG_USB_S3C_HSOTG
+#define gadget_is_s3c_hsotg(g)    (!strcmp("s3c-hsotg", (g)->name))
+#else
+#define gadget_is_s3c_hsotg(g)    0
+#endif
+
 
 /**
  * usb_gadget_controller_number - support bcdDevice id convention
@@ -192,6 +198,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
                return 0x24;
        else if (gadget_is_r8a66597(gadget))
                return 0x25;
+       else if (gadget_is_s3c_hsotg(gadget))
+               return 0x26;
        return -ENOENT;
 }