]> git.baikalelectronics.ru Git - kernel.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 23 Jan 2011 02:38:58 +0000 (18:38 -0800)
commitfc44d96f31bd044ac036887d0a74cfaa81706c22
tree349322cc16dc14d29154567011163cf9c35a0ce4
parent1a637c362665fd6833e7ffe9763d67bc54c4f8b1
USB: g_printer: fix bug in module parameter definitions

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>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/printer.c