diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2012-01-13 09:32:20 +1030 | 
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-01-13 09:32:20 +1030 | 
| commit | 90ab5ee94171b3e28de6bb42ee30b527014e0be7 (patch) | |
| tree | fcf89889f6e881f2b231d3d20287c08174ce4b54 /drivers/usb/core | |
| parent | 476bc0015bf09dad39d36a8b19f76f0c181d1ec9 (diff) | |
| download | olio-linux-3.10-90ab5ee94171b3e28de6bb42ee30b527014e0be7.tar.xz olio-linux-3.10-90ab5ee94171b3e28de6bb42ee30b527014e0be7.zip  | |
module_param: make bool parameters really bool (drivers & misc)
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.
It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/devio.c | 2 | ||||
| -rw-r--r-- | drivers/usb/core/hub.c | 8 | ||||
| -rw-r--r-- | drivers/usb/core/usb.c | 2 | 
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 3af5e2dd1d8..8df4b76465a 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -93,7 +93,7 @@ struct async {  	u8 bulk_status;  }; -static int usbfs_snoop; +static bool usbfs_snoop;  module_param(usbfs_snoop, bool, S_IRUGO | S_IWUSR);  MODULE_PARM_DESC(usbfs_snoop, "true to log all usbfs traffic"); diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 79d339e2e70..a0613d8f9be 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -102,7 +102,7 @@ static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);  static struct task_struct *khubd_task;  /* cycle leds on hubs that aren't blinking for attention */ -static int blinkenlights = 0; +static bool blinkenlights = 0;  module_param (blinkenlights, bool, S_IRUGO);  MODULE_PARM_DESC (blinkenlights, "true to cycle leds on hubs"); @@ -131,12 +131,12 @@ MODULE_PARM_DESC(initial_descriptor_timeout,   * otherwise the new scheme is used.  If that fails and "use_both_schemes"   * is set, then the driver will make another attempt, using the other scheme.   */ -static int old_scheme_first = 0; +static bool old_scheme_first = 0;  module_param(old_scheme_first, bool, S_IRUGO | S_IWUSR);  MODULE_PARM_DESC(old_scheme_first,  		 "start with the old device initialization scheme"); -static int use_both_schemes = 1; +static bool use_both_schemes = 1;  module_param(use_both_schemes, bool, S_IRUGO | S_IWUSR);  MODULE_PARM_DESC(use_both_schemes,  		"try the other device initialization scheme if the " @@ -2026,7 +2026,7 @@ static unsigned hub_is_wusb(struct usb_hub *hub)  #define SET_ADDRESS_TRIES	2  #define GET_DESCRIPTOR_TRIES	2  #define SET_CONFIG_TRIES	(2 * (use_both_schemes + 1)) -#define USE_NEW_SCHEME(i)	((i) / 2 == old_scheme_first) +#define USE_NEW_SCHEME(i)	((i) / 2 == (int)old_scheme_first)  #define HUB_ROOT_RESET_TIME	50	/* times are in msec */  #define HUB_SHORT_RESET_TIME	10 diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 1382c90d083..8ca9f994a28 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -47,7 +47,7 @@  const char *usbcore_name = "usbcore"; -static int nousb;	/* Disable USB when built into kernel image */ +static bool nousb;	/* Disable USB when built into kernel image */  #ifdef	CONFIG_USB_SUSPEND  static int usb_autosuspend_delay = 2;		/* Default delay value,  |