aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/tcm_usb_gadget.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-10 09:01:53 -0400
committerFelipe Balbi <balbi@ti.com>2012-09-10 09:12:59 -0400
commit7d16e8d3eb704f5f6eb5a271d5758b495634e8e6 (patch)
tree146c2f02239fc5df53976092384bc74ed29f7c02 /drivers/usb/gadget/tcm_usb_gadget.c
parent3b4a3fc0ba83265c0bfcfdfc3416e65e47441747 (diff)
usb: gadget: push VID/PID/USB BCD module option into gadgets
This patch moves the module options idVendor, idProduct and bcdDevice from composite.c into each gadgets. This ensures compatibility with current gadgets and removes the global variable which brings me step closer towards composite.c in libcomposite Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/tcm_usb_gadget.c')
-rw-r--r--drivers/usb/gadget/tcm_usb_gadget.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c
index 2f4980881a80..fa3137ef228b 100644
--- a/drivers/usb/gadget/tcm_usb_gadget.c
+++ b/drivers/usb/gadget/tcm_usb_gadget.c
@@ -29,6 +29,8 @@
29 29
30#include "tcm_usb_gadget.h" 30#include "tcm_usb_gadget.h"
31 31
32USB_GADGET_COMPOSITE_OPTIONS();
33
32static struct target_fabric_configfs *usbg_fabric_configfs; 34static struct target_fabric_configfs *usbg_fabric_configfs;
33 35
34static inline struct f_uas *to_f_uas(struct usb_function *f) 36static inline struct f_uas *to_f_uas(struct usb_function *f)
@@ -2437,6 +2439,9 @@ static int usb_target_bind(struct usb_composite_dev *cdev)
2437 2439
2438 ret = usb_add_config(cdev, &usbg_config_driver, 2440 ret = usb_add_config(cdev, &usbg_config_driver,
2439 usbg_cfg_bind); 2441 usbg_cfg_bind);
2442 if (ret)
2443 return ret;
2444 usb_composite_overwrite_options(cdev, &coverwrite);
2440 return 0; 2445 return 0;
2441} 2446}
2442 2447