All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.27.3 usbcore] Move __module_param_call(nousb) to immediately after declaration of nousb.
@ 2008-10-24  1:58 Tetsuo Handa
  2008-10-24  4:19 ` Greg KH
  2008-10-24 13:59 ` Alan Stern
  0 siblings, 2 replies; 7+ messages in thread
From: Tetsuo Handa @ 2008-10-24  1:58 UTC (permalink / raw)
  To: greg; +Cc: linux-usb, linux-kernel

Hello.

I don't know the reason, but the below patch solves the problem which I'm
experiencing with CONFIG_USB=y on Debian Sarge (gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)).

Something is wrong with sorting symbol table or walking sysfs tree?

Without this patch:

# ls -ail /sys/module/usbcore/parameters/
total 0
200 drwxr-xr-x  2 root root    0 Oct 24 10:13
200 drwxr-xr-x  2 root root    0 Oct 24 10:13 .
199 drwxr-xr-x  4 root root    0 Oct 24 10:13 ..
201 -rw-r--r--  1 root root 4096 Oct 24 10:13 autosuspend
203 -r--r--r--  1 root root 4096 Oct 24 10:13 blinkenlights
204 -rw-r--r--  1 root root 4096 Oct 24 10:13 old_scheme_first
205 -rw-r--r--  1 root root 4096 Oct 24 10:13 use_both_schemes

With this patch:

# ls -ail /sys/module/usbcore/parameters/
total 0
200 drwxr-xr-x  2 root root    0 Oct 24 10:20 .
199 drwxr-xr-x  4 root root    0 Oct 24 10:20 ..
201 -rw-r--r--  1 root root 4096 Oct 24 10:20 autosuspend
202 -r--r--r--  1 root root 4096 Oct 24 10:20 blinkenlights
203 -rw-r--r--  1 root root 4096 Oct 24 10:20 old_scheme_first
205 -rw-r--r--  1 root root 4096 Oct 24 10:20 usbfs_snoop
204 -rw-r--r--  1 root root 4096 Oct 24 10:20 use_both_schemes

Regards.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 drivers/usb/core/usb.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- linux-2.6.27.3.orig/drivers/usb/core/usb.c
+++ linux-2.6.27.3/drivers/usb/core/usb.c
@@ -47,6 +47,8 @@
 const char *usbcore_name = "usbcore";
 
 static int nousb;	/* Disable USB when built into kernel image */
+/* format to disable USB on kernel command line is: nousb */
+__module_param_call("", nousb, param_set_bool, param_get_bool, &nousb, 0444);
 
 /* Workqueue for autosuspend and for remote wakeup of root hubs */
 struct workqueue_struct *ksuspend_usb_wq;
@@ -962,9 +964,6 @@ void usb_buffer_unmap_sg(const struct us
 }
 EXPORT_SYMBOL_GPL(usb_buffer_unmap_sg);
 
-/* format to disable USB on kernel command line is: nousb */
-__module_param_call("", nousb, param_set_bool, param_get_bool, &nousb, 0444);
-
 /*
  * for external read access to <nousb>
  */

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-26 16:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-24  1:58 [PATCH 2.6.27.3 usbcore] Move __module_param_call(nousb) to immediately after declaration of nousb Tetsuo Handa
2008-10-24  4:19 ` Greg KH
2008-10-24 15:26   ` [PATCH 2.6.27.3 usbcore] Move __module_param_call(nousb) toimmediately " Tetsuo Handa
2008-10-24 16:19     ` Alan Stern
2008-10-25  1:10       ` [PATCH 2.6.27.3 usbcore] Move __module_param_call(nousb) to immediately " Tetsuo Handa
2008-10-26 16:11         ` Alan Stern
2008-10-24 13:59 ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.