diff options
author | Hannes Reinecke <hare@suse.de> | 2014-06-25 15:27:37 +0200 |
---|---|---|
committer | Maciej Wereski <m.wereski@partner.samsung.com> | 2015-06-09 11:31:25 +0200 |
commit | 0da1c80e06c772aea60ca6deba857dacb1a1d0d9 (patch) | |
tree | f13fa89d9a548449040d9984d0ba3756d4a5b424 | |
parent | d51b9bfdade67ab7967d3d281483578831e86c0f (diff) | |
download | linux-3.10-0da1c80e06c772aea60ca6deba857dacb1a1d0d9.tar.gz linux-3.10-0da1c80e06c772aea60ca6deba857dacb1a1d0d9.tar.bz2 linux-3.10-0da1c80e06c772aea60ca6deba857dacb1a1d0d9.zip |
Add module param type 'ullong'
Some driver might want to pass in an 64-bit value, so introduce
a module param type 'ullong'.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | include/linux/moduleparam.h | 5 | ||||
-rw-r--r-- | kernel/params.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 137b4198fc0..4ea89045585 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -372,6 +372,11 @@ extern int param_set_ulong(const char *val, const struct kernel_param *kp); extern int param_get_ulong(char *buffer, const struct kernel_param *kp); #define param_check_ulong(name, p) __param_check(name, p, unsigned long) +extern struct kernel_param_ops param_ops_ullong; +extern int param_set_ullong(const char *val, const struct kernel_param *kp); +extern int param_get_ullong(char *buffer, const struct kernel_param *kp); +#define param_check_ullong(name, p) __param_check(name, p, unsigned long long) + extern struct kernel_param_ops param_ops_charp; extern int param_set_charp(const char *val, const struct kernel_param *kp); extern int param_get_charp(char *buffer, const struct kernel_param *kp); diff --git a/kernel/params.c b/kernel/params.c index d82957ea901..c1094cf1ae6 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -252,6 +252,7 @@ STANDARD_PARAM_DEF(int, int, "%i", kstrtoint); STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint); STANDARD_PARAM_DEF(long, long, "%li", kstrtol); STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul); +STANDARD_PARAM_DEF(ullong, unsigned long long, "%llu", kstrtoull); int param_set_charp(const char *val, const struct kernel_param *kp) { |