aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/params.c')
-rw-r--r--kernel/params.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 8d95f5451b22..d55a53ec9234 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -516,6 +516,7 @@ static __modinit int add_sysfs_param(struct module_kobject *mk,
516 new->grp.attrs = attrs; 516 new->grp.attrs = attrs;
517 517
518 /* Tack new one on the end. */ 518 /* Tack new one on the end. */
519 sysfs_attr_init(&new->attrs[num].mattr.attr);
519 new->attrs[num].param = kp; 520 new->attrs[num].param = kp;
520 new->attrs[num].mattr.show = param_attr_show; 521 new->attrs[num].mattr.show = param_attr_show;
521 new->attrs[num].mattr.store = param_attr_store; 522 new->attrs[num].mattr.store = param_attr_store;
@@ -722,7 +723,7 @@ static ssize_t module_attr_store(struct kobject *kobj,
722 return ret; 723 return ret;
723} 724}
724 725
725static struct sysfs_ops module_sysfs_ops = { 726static const struct sysfs_ops module_sysfs_ops = {
726 .show = module_attr_show, 727 .show = module_attr_show,
727 .store = module_attr_store, 728 .store = module_attr_store,
728}; 729};
@@ -736,7 +737,7 @@ static int uevent_filter(struct kset *kset, struct kobject *kobj)
736 return 0; 737 return 0;
737} 738}
738 739
739static struct kset_uevent_ops module_uevent_ops = { 740static const struct kset_uevent_ops module_uevent_ops = {
740 .filter = uevent_filter, 741 .filter = uevent_filter,
741}; 742};
742 743