public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org,
	linux-usb-devel@lists.sourceforge.net, zaitcev@redhat.com
Subject: usb: replace __setup("nousb") with __module_param_call
Date: Tue, 20 Dec 2005 14:15:04 -0800	[thread overview]
Message-ID: <20051220141504.31441a41.zaitcev@redhat.com> (raw)

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: Pete Zaitcev <zaitcev@redhat.com>

---

--- linux-2.6.14/drivers/usb/core/usb.c	2005-10-28 19:12:01.000000000 -0700
+++ linux-2.6.14-lem/drivers/usb/core/usb.c	2005-12-20 10:53:21.000000000 -0800
@@ -54,7 +54,6 @@
 const char *usbcore_name = "usbcore";
 
 static int nousb;	/* Disable USB when built into kernel image */
-			/* Not honored on modular build */
 
 static DECLARE_RWSEM(usb_all_devices_rwsem);
 
@@ -1455,18 +1454,8 @@
 	.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>

             reply	other threads:[~2005-12-20 22:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-20 22:15 Pete Zaitcev [this message]
2005-12-22  6:10 ` usb: replace __setup("nousb") with __module_param_call Dmitry Torokhov
2005-12-22  8:24   ` Pete Zaitcev
2006-01-03  6:47     ` Dmitry Torokhov
2006-01-03  7:07       ` Pete Zaitcev
2006-01-03 14:46         ` Dmitry Torokhov
2006-01-03 19:35           ` Pete Zaitcev
2006-01-03 20:34             ` [linux-usb-devel] " Alan Stern
2006-01-03 20:38               ` Dmitry Torokhov
2006-01-03 20:52                 ` Alan Stern
2006-01-03 21:04                   ` Dmitry Torokhov
2006-01-03 20:44               ` Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051220141504.31441a41.zaitcev@redhat.com \
    --to=zaitcev@redhat.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox