summaryrefslogtreecommitdiffstats
path: root/include/linux/usb/composite.h
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-10 15:01:54 +0200
committerFelipe Balbi <balbi@ti.com>2012-09-10 16:13:00 +0300
commit1cf0d264088907038be560ba2dd472d5e432a3dc (patch)
treec62973c662c6c43763f672e65d8ae167e39686cc /include/linux/usb/composite.h
parent276e2e4f1f3e07a0ad891bf757dbcfd655ff5f91 (diff)
downloadblackbird-op-linux-1cf0d264088907038be560ba2dd472d5e432a3dc.tar.gz
blackbird-op-linux-1cf0d264088907038be560ba2dd472d5e432a3dc.zip
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>
Diffstat (limited to 'include/linux/usb/composite.h')
-rw-r--r--include/linux/usb/composite.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index f821a3ad475d..9d068a4be778 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -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);
OpenPOWER on IntegriCloud