diff options
Diffstat (limited to 'drivers/usb/gadget/printer.c')
-rw-r--r-- | drivers/usb/gadget/printer.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index cf241c371a71..15222ebf3422 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -131,31 +131,31 @@ static struct printer_dev usb_printer_gadget; | |||
131 | * parameters are in UTF-8 (superset of ASCII's 7 bit characters). | 131 | * parameters are in UTF-8 (superset of ASCII's 7 bit characters). |
132 | */ | 132 | */ |
133 | 133 | ||
134 | static ushort __initdata idVendor; | 134 | static ushort idVendor; |
135 | module_param(idVendor, ushort, S_IRUGO); | 135 | module_param(idVendor, ushort, S_IRUGO); |
136 | MODULE_PARM_DESC(idVendor, "USB Vendor ID"); | 136 | MODULE_PARM_DESC(idVendor, "USB Vendor ID"); |
137 | 137 | ||
138 | static ushort __initdata idProduct; | 138 | static ushort idProduct; |
139 | module_param(idProduct, ushort, S_IRUGO); | 139 | module_param(idProduct, ushort, S_IRUGO); |
140 | MODULE_PARM_DESC(idProduct, "USB Product ID"); | 140 | MODULE_PARM_DESC(idProduct, "USB Product ID"); |
141 | 141 | ||
142 | static ushort __initdata bcdDevice; | 142 | static ushort bcdDevice; |
143 | module_param(bcdDevice, ushort, S_IRUGO); | 143 | module_param(bcdDevice, ushort, S_IRUGO); |
144 | MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)"); | 144 | MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)"); |
145 | 145 | ||
146 | static char *__initdata iManufacturer; | 146 | static char *iManufacturer; |
147 | module_param(iManufacturer, charp, S_IRUGO); | 147 | module_param(iManufacturer, charp, S_IRUGO); |
148 | MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string"); | 148 | MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string"); |
149 | 149 | ||
150 | static char *__initdata iProduct; | 150 | static char *iProduct; |
151 | module_param(iProduct, charp, S_IRUGO); | 151 | module_param(iProduct, charp, S_IRUGO); |
152 | MODULE_PARM_DESC(iProduct, "USB Product string"); | 152 | MODULE_PARM_DESC(iProduct, "USB Product string"); |
153 | 153 | ||
154 | static char *__initdata iSerialNum; | 154 | static char *iSerialNum; |
155 | module_param(iSerialNum, charp, S_IRUGO); | 155 | module_param(iSerialNum, charp, S_IRUGO); |
156 | MODULE_PARM_DESC(iSerialNum, "1"); | 156 | MODULE_PARM_DESC(iSerialNum, "1"); |
157 | 157 | ||
158 | static char *__initdata iPNPstring; | 158 | static char *iPNPstring; |
159 | module_param(iPNPstring, charp, S_IRUGO); | 159 | module_param(iPNPstring, charp, S_IRUGO); |
160 | MODULE_PARM_DESC(iPNPstring, "MFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;"); | 160 | MODULE_PARM_DESC(iPNPstring, "MFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;"); |
161 | 161 | ||
@@ -1596,13 +1596,12 @@ cleanup(void) | |||
1596 | int status; | 1596 | int status; |
1597 | 1597 | ||
1598 | mutex_lock(&usb_printer_gadget.lock_printer_io); | 1598 | mutex_lock(&usb_printer_gadget.lock_printer_io); |
1599 | class_destroy(usb_gadget_class); | ||
1600 | unregister_chrdev_region(g_printer_devno, 2); | ||
1601 | |||
1602 | status = usb_gadget_unregister_driver(&printer_driver); | 1599 | status = usb_gadget_unregister_driver(&printer_driver); |
1603 | if (status) | 1600 | if (status) |
1604 | ERROR(dev, "usb_gadget_unregister_driver %x\n", status); | 1601 | ERROR(dev, "usb_gadget_unregister_driver %x\n", status); |
1605 | 1602 | ||
1603 | unregister_chrdev_region(g_printer_devno, 2); | ||
1604 | class_destroy(usb_gadget_class); | ||
1606 | mutex_unlock(&usb_printer_gadget.lock_printer_io); | 1605 | mutex_unlock(&usb_printer_gadget.lock_printer_io); |
1607 | } | 1606 | } |
1608 | module_exit(cleanup); | 1607 | module_exit(cleanup); |