summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/printer.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-10 15:01:53 +0200
committerFelipe Balbi <balbi@ti.com>2012-09-10 16:12:59 +0300
commit7d16e8d3eb704f5f6eb5a271d5758b495634e8e6 (patch)
tree146c2f02239fc5df53976092384bc74ed29f7c02 /drivers/usb/gadget/printer.c
parent3b4a3fc0ba83265c0bfcfdfc3416e65e47441747 (diff)
downloadblackbird-op-linux-7d16e8d3eb704f5f6eb5a271d5758b495634e8e6.tar.gz
blackbird-op-linux-7d16e8d3eb704f5f6eb5a271d5758b495634e8e6.zip
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/printer.c')
-rw-r--r--drivers/usb/gadget/printer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index 51b6e7bf413e..3fa4d80629cc 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -54,6 +54,7 @@
#include "composite.c"
/*-------------------------------------------------------------------------*/
+USB_GADGET_COMPOSITE_OPTIONS();
#define DRIVER_DESC "Printer Gadget"
#define DRIVER_VERSION "2007 OCT 06"
@@ -1265,6 +1266,9 @@ static int __init printer_bind(struct usb_composite_dev *cdev)
device_desc.iSerialNumber = strings[STRING_SERIALNUM].id;
ret = usb_add_config(cdev, &printer_cfg_driver, printer_bind_config);
+ if (ret)
+ return ret;
+ usb_composite_overwrite_options(cdev, &coverwrite);
return ret;
}
OpenPOWER on IntegriCloud