summaryrefslogtreecommitdiff
path: root/kernel/params.c
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2012-02-01 10:33:11 +0800
committerRusty Russell <rusty@rustcorp.com.au>2012-02-14 11:02:15 +1030
commit10f296cbfe3b93188c41463fd7a53808ebdbcbe3 (patch)
treeaac97957a1759a160b5e8d0dd9b4ba59c6e7d2e0 /kernel/params.c
parentd65b4e98d7ea3038b767b70fe8be959b2913f16d (diff)
module: make module param bint handle nul value
Allow bint param accept nul values, just do same as bool param. Signed-off-by: Dave Young <dyoung@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/params.c')
-rw-r--r--kernel/params.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 32ee04308285..4bc965d8a1fe 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -97,7 +97,8 @@ static int parse_one(char *param,
for (i = 0; i < num_params; i++) {
if (parameq(param, params[i].name)) {
/* No one handled NULL, so do it here. */
- if (!val && params[i].ops->set != param_set_bool)
+ if (!val && params[i].ops->set != param_set_bool
+ && params[i].ops->set != param_set_bint)
return -EINVAL;
pr_debug("They are equal! Calling %p\n",
params[i].ops->set);