Skip to content

Commit

Permalink
USB: gadget: add gadget controller number for s3c-hsotg driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcuelenaere authored and gregkh committed Mar 19, 2010
1 parent 9c67d28 commit 83ba11d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/usb/gadget/gadget_chips.h
Expand Up @@ -136,6 +136,12 @@
#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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 83ba11d

Please sign in to comment.