summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/printer.c
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 /drivers/usb/gadget/printer.c
parent276e2e4f1f3e07a0ad891bf757dbcfd655ff5f91 (diff)
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 'drivers/usb/gadget/printer.c')
-rw-r--r--drivers/usb/gadget/printer.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index f02434a10de..3321a9df486 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -118,8 +118,7 @@ static struct printer_dev usb_printer_gadget;
* parameters are in UTF-8 (superset of ASCII's 7 bit characters).
*/
-static char *iSerialNum;
-module_param(iSerialNum, charp, S_IRUGO);
+module_param_named(iSerialNum, coverwrite.serial_number, charp, S_IRUGO);
MODULE_PARM_DESC(iSerialNum, "1");
static char *iPNPstring;
@@ -1170,9 +1169,6 @@ static int __init printer_bind_config(struct usb_configuration *c)
init_utsname()->sysname, init_utsname()->release,
gadget->name);
- if (iSerialNum)
- strlcpy(serial_num, iSerialNum, sizeof serial_num);
-
if (iPNPstring)
strlcpy(&pnp_string[2], iPNPstring, (sizeof pnp_string)-2);