From f1577452f18e893e59bba53b3bda4fab17cc66c6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 22 Aug 2004 22:26:41 -0700 Subject: [PATCH] fix reading string module parameters in sysfs Reading the contents of a module_param_string through sysfs currently oopses because the param_get_charp() function cannot operate on a kparam_string struct. This introduces the required param_get_string. Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/moduleparam.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux/moduleparam.h') diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 9e799ecc1b43..bdd36a8f9a4d 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -73,7 +73,7 @@ struct kparam_array #define module_param_string(name, string, len, perm) \ static struct kparam_string __param_string_##name \ = { len, string }; \ - module_param_call(name, param_set_copystring, param_get_charp, \ + module_param_call(name, param_set_copystring, param_get_string, \ &__param_string_##name, perm) /* Called on module insert or kernel boot */ @@ -140,6 +140,7 @@ extern int param_array_set(const char *val, struct kernel_param *kp); extern int param_array_get(char *buffer, struct kernel_param *kp); extern int param_set_copystring(const char *val, struct kernel_param *kp); +extern int param_get_string(char *buffer, struct kernel_param *kp); int param_array(const char *name, const char *val, -- cgit v1.2.3