diff options
author | Dave Young <dyoung@redhat.com> | 2012-02-01 03:33:11 +0100 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-02-14 01:32:15 +0100 |
commit | 10f296cbfe3b93188c41463fd7a53808ebdbcbe3 (patch) | |
tree | aac97957a1759a160b5e8d0dd9b4ba59c6e7d2e0 /kernel/params.c | |
parent | Linux 3.3-rc3 (diff) | |
download | linux-10f296cbfe3b93188c41463fd7a53808ebdbcbe3.tar.xz linux-10f296cbfe3b93188c41463fd7a53808ebdbcbe3.zip |
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 '')
-rw-r--r-- | kernel/params.c | 3 |
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); |