Commit aafbf24a authored by Pete Zaitcev's avatar Pete Zaitcev Committed by Greg Kroah-Hartman

[PATCH] USB: replace __setup("nousb") with __module_param_call

Fedora users complain that passing "nousbstorage" to the installer causes
the rest of the USB support to disappear. The installer uses kernel command
line as a way to pass options through Syslinux. The problem stems from the
use of strncmp() in obsolete_checksetup().

I used __module_param_call() instead of module_param because I wanted to
preserve the old syntax in grub.conf, and it's the only macro which allows
to remove the prefix.

The fix is tested to accept the option "nousb" correctly now.
Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5e0f76c6
......@@ -46,7 +46,6 @@
const char *usbcore_name = "usbcore";
static int nousb; /* Disable USB when built into kernel image */
/* Not honored on modular build */
/**
......@@ -1096,18 +1095,8 @@ struct bus_type usb_bus_type = {
.resume = usb_generic_resume,
};
#ifndef MODULE
static int __init usb_setup_disable(char *str)
{
nousb = 1;
return 1;
}
/* format to disable USB on kernel command line is: nousb */
__setup("nousb", usb_setup_disable);
#endif
__module_param_call("", nousb, param_set_bool, param_get_bool, &nousb, 0444);
/*
* for external read access to <nousb>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment