summaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc_sysfs.c
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-07-17 10:20:25 +0200
committerBorislav Petkov <bp@suse.de>2017-07-17 10:20:25 +0200
commit1c18be5a4e3ecbb40fbee015711aea6cc6467417 (patch)
tree4bd05deb05fa39201a63e29c4c8f3bdc925f94cd /drivers/edac/edac_mc_sysfs.c
parentfbe63acf62f57f8e51adae602c5ce1025002d5ee (diff)
downloadlinux-stable-1c18be5a4e3ecbb40fbee015711aea6cc6467417.tar.gz
linux-stable-1c18be5a4e3ecbb40fbee015711aea6cc6467417.tar.bz2
linux-stable-1c18be5a4e3ecbb40fbee015711aea6cc6467417.zip
EDAC: Constify attribute_group structures
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> CC: linux-edac@vger.kernel.org Link: http://lkml.kernel.org/r/776cb8265509054abd01b0b551624cc0da3b88e7.1499078335.git.arvind.yadav.cs@gmail.com Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/edac_mc_sysfs.c')
-rw-r--r--drivers/edac/edac_mc_sysfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 445862dac273..dbc64469b7da 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -287,7 +287,7 @@ static struct attribute *csrow_attrs[] = {
NULL,
};
-static struct attribute_group csrow_attr_grp = {
+static const struct attribute_group csrow_attr_grp = {
.attrs = csrow_attrs,
};
@@ -627,7 +627,7 @@ static struct attribute *dimm_attrs[] = {
NULL,
};
-static struct attribute_group dimm_attr_grp = {
+static const struct attribute_group dimm_attr_grp = {
.attrs = dimm_attrs,
};
@@ -902,7 +902,7 @@ static umode_t mci_attr_is_visible(struct kobject *kobj,
return mode;
}
-static struct attribute_group mci_attr_grp = {
+static const struct attribute_group mci_attr_grp = {
.attrs = mci_attrs,
.is_visible = mci_attr_is_visible,
};