diff options
Diffstat (limited to 'kernel/params.c')
-rw-r--r-- | kernel/params.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/kernel/params.c b/kernel/params.c index d656c276508d..0b30ecd53a52 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -122,9 +122,7 @@ static char *next_arg(char *args, char **param, char **val) | |||
122 | next = args + i; | 122 | next = args + i; |
123 | 123 | ||
124 | /* Chew up trailing spaces. */ | 124 | /* Chew up trailing spaces. */ |
125 | while (isspace(*next)) | 125 | return skip_spaces(next); |
126 | next++; | ||
127 | return next; | ||
128 | } | 126 | } |
129 | 127 | ||
130 | /* Args looks like "foo=bar,bar2 baz=fuz wiz". */ | 128 | /* Args looks like "foo=bar,bar2 baz=fuz wiz". */ |
@@ -139,8 +137,7 @@ int parse_args(const char *name, | |||
139 | DEBUGP("Parsing ARGS: %s\n", args); | 137 | DEBUGP("Parsing ARGS: %s\n", args); |
140 | 138 | ||
141 | /* Chew leading spaces */ | 139 | /* Chew leading spaces */ |
142 | while (isspace(*args)) | 140 | args = skip_spaces(args); |
143 | args++; | ||
144 | 141 | ||
145 | while (*args) { | 142 | while (*args) { |
146 | int ret; | 143 | int ret; |
@@ -404,8 +401,8 @@ int param_get_string(char *buffer, struct kernel_param *kp) | |||
404 | } | 401 | } |
405 | 402 | ||
406 | /* sysfs output in /sys/modules/XYZ/parameters/ */ | 403 | /* sysfs output in /sys/modules/XYZ/parameters/ */ |
407 | #define to_module_attr(n) container_of(n, struct module_attribute, attr); | 404 | #define to_module_attr(n) container_of(n, struct module_attribute, attr) |
408 | #define to_module_kobject(n) container_of(n, struct module_kobject, kobj); | 405 | #define to_module_kobject(n) container_of(n, struct module_kobject, kobj) |
409 | 406 | ||
410 | extern struct kernel_param __start___param[], __stop___param[]; | 407 | extern struct kernel_param __start___param[], __stop___param[]; |
411 | 408 | ||
@@ -423,7 +420,7 @@ struct module_param_attrs | |||
423 | }; | 420 | }; |
424 | 421 | ||
425 | #ifdef CONFIG_SYSFS | 422 | #ifdef CONFIG_SYSFS |
426 | #define to_param_attr(n) container_of(n, struct param_attribute, mattr); | 423 | #define to_param_attr(n) container_of(n, struct param_attribute, mattr) |
427 | 424 | ||
428 | static ssize_t param_attr_show(struct module_attribute *mattr, | 425 | static ssize_t param_attr_show(struct module_attribute *mattr, |
429 | struct module *mod, char *buf) | 426 | struct module *mod, char *buf) |
@@ -519,6 +516,7 @@ static __modinit int add_sysfs_param(struct module_kobject *mk, | |||
519 | new->grp.attrs = attrs; | 516 | new->grp.attrs = attrs; |
520 | 517 | ||
521 | /* Tack new one on the end. */ | 518 | /* Tack new one on the end. */ |
519 | sysfs_attr_init(&new->attrs[num].mattr.attr); | ||
522 | new->attrs[num].param = kp; | 520 | new->attrs[num].param = kp; |
523 | new->attrs[num].mattr.show = param_attr_show; | 521 | new->attrs[num].mattr.show = param_attr_show; |
524 | new->attrs[num].mattr.store = param_attr_store; | 522 | new->attrs[num].mattr.store = param_attr_store; |
@@ -725,7 +723,7 @@ static ssize_t module_attr_store(struct kobject *kobj, | |||
725 | return ret; | 723 | return ret; |
726 | } | 724 | } |
727 | 725 | ||
728 | static struct sysfs_ops module_sysfs_ops = { | 726 | static const struct sysfs_ops module_sysfs_ops = { |
729 | .show = module_attr_show, | 727 | .show = module_attr_show, |
730 | .store = module_attr_store, | 728 | .store = module_attr_store, |
731 | }; | 729 | }; |
@@ -739,7 +737,7 @@ static int uevent_filter(struct kset *kset, struct kobject *kobj) | |||
739 | return 0; | 737 | return 0; |
740 | } | 738 | } |
741 | 739 | ||
742 | static struct kset_uevent_ops module_uevent_ops = { | 740 | static const struct kset_uevent_ops module_uevent_ops = { |
743 | .filter = uevent_filter, | 741 | .filter = uevent_filter, |
744 | }; | 742 | }; |
745 | 743 | ||