usb: gadget: push iManufacturer into gadgets

This patch pushes the iManufacturer module argument from composite into
each gadget. Once the user uses the module paramter, the string is
overwritten with the final value.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Sebastian Andrzej Siewior 2012-09-10 15:01:55 +02:00 committed by Felipe Balbi
parent 1cf0d26408
commit 03de9bf69c
2 changed files with 17 additions and 10 deletions

View file

@ -401,6 +401,7 @@ struct usb_composite_overwrite {
u16 idProduct;
u16 bcdDevice;
char *serial_number;
char *manufacturer;
};
#define USB_GADGET_COMPOSITE_OPTIONS() \
static struct usb_composite_overwrite coverwrite; \
@ -416,7 +417,11 @@ struct usb_composite_overwrite {
\
module_param_named(iSerialNumber, coverwrite.serial_number, charp, \
S_IRUGO); \
MODULE_PARM_DESC(iSerialNumber, "SerialNumber string")
MODULE_PARM_DESC(iSerialNumber, "SerialNumber string"); \
\
module_param_named(iManufacturer, coverwrite.manufacturer, charp, \
S_IRUGO); \
MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string")
void usb_composite_overwrite_options(struct usb_composite_dev *cdev,
struct usb_composite_overwrite *covr);