Hi, this small patch has also been submitted to linux-usb (with a different file position). It's my first kernel patch, please correct me if I'm not following the usual protocol...
Cheers, Marcus --- usb: gadget: midi: Fix ignored "index" and "id" module parameters The MIDI USB gadget driver has "index" and "id" parameters which should determine the alsa sound card index and id to use when registering the card. Those parameters had no effect, as the relevant information is only set on the midi structure after f_midi_register_card is called. This patch moves the two initialisation statements before the function call. Signed-off-by: Marcus Weseloh <[email protected]> --- drivers/usb/gadget/f_midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/f_midi.c b/drivers/usb/gadget/f_midi.c index 1bf9596..1c16bcb 100644 --- a/drivers/usb/gadget/f_midi.c +++ b/drivers/usb/gadget/f_midi.c @@ -959,6 +959,8 @@ int __init f_midi_bind_config(struct usb_configuration *c, /* set up ALSA midi devices */ midi->in_ports = in_ports; midi->out_ports = out_ports; + midi->id = kstrdup(id, GFP_KERNEL); + midi->index = index; status = f_midi_register_card(midi); if (status < 0) goto setup_fail; @@ -970,8 +972,6 @@ int __init f_midi_bind_config(struct usb_configuration *c, midi->func.set_alt = f_midi_set_alt; midi->func.disable = f_midi_disable; - midi->id = kstrdup(id, GFP_KERNEL); - midi->index = index; midi->buflen = buflen; midi->qlen = qlen; -- 1.9.1 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
