]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb: gadget: let f_* use usb_string_ids_tab() where it makes sense
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 22 Oct 2012 20:15:10 +0000 (22:15 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 31 Oct 2012 13:11:47 +0000 (15:11 +0200)
commit1616e99d42a8b427b8dcada347ef0ee0df1a1b7b
tree2753f0d18e9458c126460a731b309df9e10bb17c
parentb36c347966160ecfe420cd47a5a1f81ddaffc007
usb: gadget: let f_* use usb_string_ids_tab() where it makes sense

Instead of calling usb_string_id() multiple times I replace it with one
usb_string_ids_tab(). The NULL pointer in struct usb_string with "" and
are not overwritten in fail or unbind case.

The conditional assignment remains because some gadgets recycle the string
ID because the same descriptor (and string ID) is used if we have more
than one config descriptor.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/f_acm.c
drivers/usb/gadget/f_ecm.c
drivers/usb/gadget/f_ncm.c
drivers/usb/gadget/f_obex.c
drivers/usb/gadget/f_rndis.c
drivers/usb/gadget/f_subset.c
drivers/usb/gadget/f_uac2.c
drivers/usb/gadget/f_uvc.c