usb: gadget: make sure each gadget is using same index for Product, Serial,…
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 6 Sep 2012 18:11:21 +0000 (20:11 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 10 Sep 2012 13:13:00 +0000 (16:13 +0300)
commit276e2e4f1f3e07a0ad891bf757dbcfd655ff5f91
tree5a3d0689815314e2fab55a8c9e0a99d6853c31bd
parent7d16e8d3eb704f5f6eb5a271d5758b495634e8e6
usb: gadget: make sure each gadget is using same index for Product, Serial,…

The index in usb_string array is defined by the gadget. The gadget can
choose which index entry it assigns for the serial number and which the
product name. The gadget has just to ensure that the descriptor contains
the proper string id which is assigned by composite.
If the composite layer knows the index of the "default" information
which will be overwritten by module parameters, it can be used later to
overwrite it.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
17 files changed:
drivers/usb/gadget/acm_ms.c
drivers/usb/gadget/audio.c
drivers/usb/gadget/cdc2.c
drivers/usb/gadget/ether.c
drivers/usb/gadget/g_ffs.c
drivers/usb/gadget/gmidi.c
drivers/usb/gadget/hid.c
drivers/usb/gadget/multi.c
drivers/usb/gadget/ncm.c
drivers/usb/gadget/nokia.c
drivers/usb/gadget/printer.c
drivers/usb/gadget/serial.c
drivers/usb/gadget/tcm_usb_gadget.c
drivers/usb/gadget/tcm_usb_gadget.h
drivers/usb/gadget/webcam.c
drivers/usb/gadget/zero.c
include/linux/usb/composite.h