Commit 9a71af2c3627b379b7c31917a7f6ee0d29bc559b

Authored by Rusty Russell
1 parent ab8e2eb722

module_param: invbool should take a 'bool', not an 'int'

It takes an 'int' for historical reasons, and there are only two
users: simply switch it over to bool.

The other user (uvesafb.c) will get a (harmless-on-x86) warning until
the next patch is applied.

Cc: Brad Douglas <brad@neruo.com>
Cc: Michal Januszewski <spock@gentoo.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Showing 3 changed files with 4 additions and 4 deletions Side-by-side Diff

drivers/video/aty/aty128fb.c
... ... @@ -354,7 +354,7 @@
354 354 static int default_lcd_on __devinitdata = 1;
355 355  
356 356 #ifdef CONFIG_MTRR
357   -static int mtrr = 1;
  357 +static bool mtrr = true;
358 358 #endif
359 359  
360 360 #ifdef CONFIG_PMAC_BACKLIGHT
include/linux/moduleparam.h
... ... @@ -192,7 +192,7 @@
192 192  
193 193 extern int param_set_invbool(const char *val, struct kernel_param *kp);
194 194 extern int param_get_invbool(char *buffer, struct kernel_param *kp);
195   -#define param_check_invbool(name, p) __param_check(name, p, int)
  195 +#define param_check_invbool(name, p) __param_check(name, p, bool)
196 196  
197 197 /* Comma-separated array: *nump is set to number they actually specified. */
198 198 #define module_param_array_named(name, array, type, nump, perm) \
... ... @@ -272,13 +272,13 @@
272 272 dummy.arg = &boolval;
273 273 ret = param_set_bool(val, &dummy);
274 274 if (ret == 0)
275   - *(int *)kp->arg = !boolval;
  275 + *(bool *)kp->arg = !boolval;
276 276 return ret;
277 277 }
278 278  
279 279 int param_get_invbool(char *buffer, struct kernel_param *kp)
280 280 {
281   - return sprintf(buffer, "%c", (*(int *)kp->arg) ? 'N' : 'Y');
  281 + return sprintf(buffer, "%c", (*(bool *)kp->arg) ? 'N' : 'Y');
282 282 }
283 283  
284 284 /* We break the rule and mangle the string. */