usb: gadget: push iSerialNumber into gadgets
This patch pushes the iSerialNumber 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:
parent
276e2e4f1f
commit
1cf0d26408
4 changed files with 41 additions and 13 deletions
|
@ -400,6 +400,7 @@ struct usb_composite_overwrite {
|
|||
u16 idVendor;
|
||||
u16 idProduct;
|
||||
u16 bcdDevice;
|
||||
char *serial_number;
|
||||
};
|
||||
#define USB_GADGET_COMPOSITE_OPTIONS() \
|
||||
static struct usb_composite_overwrite coverwrite; \
|
||||
|
@ -411,7 +412,11 @@ struct usb_composite_overwrite {
|
|||
MODULE_PARM_DESC(idProduct, "USB Product ID"); \
|
||||
\
|
||||
module_param_named(bcdDevice, coverwrite.bcdDevice, ushort, S_IRUGO); \
|
||||
MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)")
|
||||
MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)"); \
|
||||
\
|
||||
module_param_named(iSerialNumber, coverwrite.serial_number, charp, \
|
||||
S_IRUGO); \
|
||||
MODULE_PARM_DESC(iSerialNumber, "SerialNumber string")
|
||||
|
||||
void usb_composite_overwrite_options(struct usb_composite_dev *cdev,
|
||||
struct usb_composite_overwrite *covr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue