aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/gmidi.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/gmidi.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/gmidi.c')
-rw-r--r--drivers/usb/gadget/gmidi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c
index 68f8c032ba6b..01b31e2d03af 100644
--- a/drivers/usb/gadget/gmidi.c
+++ b/drivers/usb/gadget/gmidi.c
@@ -48,6 +48,8 @@ MODULE_LICENSE("GPL v2");
48static const char shortname[] = "g_midi"; 48static const char shortname[] = "g_midi";
49static const char longname[] = "MIDI Gadget"; 49static const char longname[] = "MIDI Gadget";
50 50
51USB_GADGET_COMPOSITE_OPTIONS();
52
51static int index = SNDRV_DEFAULT_IDX1; 53static int index = SNDRV_DEFAULT_IDX1;
52module_param(index, int, S_IRUGO); 54module_param(index, int, S_IRUGO);
53MODULE_PARM_DESC(index, "Index value for the USB MIDI Gadget adapter."); 55MODULE_PARM_DESC(index, "Index value for the USB MIDI Gadget adapter.");
@@ -163,7 +165,7 @@ static int __init midi_bind(struct usb_composite_dev *cdev)
163 status = usb_add_config(cdev, &midi_config, midi_bind_config); 165 status = usb_add_config(cdev, &midi_config, midi_bind_config);
164 if (status < 0) 166 if (status < 0)
165 return status; 167 return status;
166 168 usb_composite_overwrite_options(cdev, &coverwrite);
167 pr_info("%s\n", longname); 169 pr_info("%s\n", longname);
168 return 0; 170 return 0;
169} 171}