]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: g_printer: fix bug in module parameter definitions
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 10 Jan 2011 16:24:14 +0000 (11:24 -0500)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 26 Jun 2011 16:46:19 +0000 (12:46 -0400)
commite9dcf53e8f55b9c04d9b6c78a0a5bc767851863c
treecc9a3d71ac1df89ec3c909b5777ce81139a1cf64
parentc68c7efc9374040d1d224eadebe3dc1a075d5eca
USB: g_printer: fix bug in module parameter definitions

commit ad84e4a9efb7c8ed322bafb6ebdb9c3a49a3d3a8 upstream.

This patch (as1442) fixes a bug in g_printer: Module parameters should
not be marked "__initdata" if they are accessible in sysfs (i.e., if
the mode value in the module_param() macro is nonzero).  Otherwise
attempts to access the parameters will cause addressing violations.

Character-string module parameters must not be marked "__initdata"
if the module can be unloaded, because the kernel needs to access the
parameter variable at unload time in order to free the
dynamically-allocated string.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Roland Kletzing <devzero@web.de>
CC: Craig W. Nadler <craig@nadler.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/usb/gadget/printer.c