aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-12 23:46:53 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:16:56 -0400
commit9a71af2c3627b379b7c31917a7f6ee0d29bc559b (patch)
treec09049a6a4458be91844500d7d5034b63a1cdcc7 /kernel/params.c
parentab8e2eb722f1e5fcbd8181e3e9ef4e95c52124df (diff)
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>
Diffstat (limited to 'kernel/params.c')
-rw-r--r--kernel/params.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/params.c b/kernel/params.c
index de273ec85bd2..023abbf5f89f 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -272,13 +272,13 @@ int param_set_invbool(const char *val, struct kernel_param *kp)
272 dummy.arg = &boolval; 272 dummy.arg = &boolval;
273 ret = param_set_bool(val, &dummy); 273 ret = param_set_bool(val, &dummy);
274 if (ret == 0) 274 if (ret == 0)
275 *(int *)kp->arg = !boolval; 275 *(bool *)kp->arg = !boolval;
276 return ret; 276 return ret;
277} 277}
278 278
279int param_get_invbool(char *buffer, struct kernel_param *kp) 279int 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/* We break the rule and mangle the string. */ 284/* We break the rule and mangle the string. */