Skip to content

Commit

Permalink
USB: Don't use __module_param_call; use core_param.
Browse files Browse the repository at this point in the history
Impact: cleanup

Found this when I changed args to __module_param_call.  We now have
core_param for exactly this, but Greg assures me "nousb" is used as a
module parameter, so we need the #ifdef MODULE.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Rusty Russell authored and Greg Kroah-Hartman committed Jan 7, 2009
1 parent 96983d2 commit 785895f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/usb/core/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,12 @@ void usb_buffer_unmap_sg(const struct usb_device *dev, int is_in,
}
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);
/* To disable USB, kernel command line is 'nousb' not 'usbcore.nousb' */
#ifdef MODULE
module_param(nousb, bool, 0444);
#else
core_param(nousb, nousb, bool, 0444);
#endif

/*
* for external read access to <nousb>
Expand Down

0 comments on commit 785895f

Please sign in to comment.