You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user