aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-19 04:22:12 -0400
committerBorislav Petkov <bp@suse.de>2017-08-20 07:12:32 -0400
commitb2b3e7362ee7014ad9c40c925a4c27a690dbdd77 (patch)
treedbf604c75d6ab107a4744aeb9892a3622220b348
parentbc8f10babcc27c1f4d8e80d91cc543eabf9125c4 (diff)
EDAC: Make device_type const
Make these const as they are only stored in the type field of a device structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1503130946-2854-2-git-send-email-bhumirks@gmail.com Signed-off-by: Borislav Petkov <bp@suse.de>
-rw-r--r--drivers/edac/edac_mc_sysfs.c8
-rw-r--r--drivers/edac/i7core_edac.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index dbc64469b7da..e4fcfa84fbd3 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev)
304 kfree(csrow); 304 kfree(csrow);
305} 305}
306 306
307static struct device_type csrow_attr_type = { 307static const struct device_type csrow_attr_type = {
308 .groups = csrow_attr_groups, 308 .groups = csrow_attr_groups,
309 .release = csrow_attr_release, 309 .release = csrow_attr_release,
310}; 310};
@@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev)
644 kfree(dimm); 644 kfree(dimm);
645} 645}
646 646
647static struct device_type dimm_attr_type = { 647static const struct device_type dimm_attr_type = {
648 .groups = dimm_attr_groups, 648 .groups = dimm_attr_groups,
649 .release = dimm_attr_release, 649 .release = dimm_attr_release,
650}; 650};
@@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev)
920 kfree(mci); 920 kfree(mci);
921} 921}
922 922
923static struct device_type mci_attr_type = { 923static const struct device_type mci_attr_type = {
924 .groups = mci_attr_groups, 924 .groups = mci_attr_groups,
925 .release = mci_attr_release, 925 .release = mci_attr_release,
926}; 926};
@@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev)
1074 kfree(dev); 1074 kfree(dev);
1075} 1075}
1076 1076
1077static struct device_type mc_attr_type = { 1077static const struct device_type mc_attr_type = {
1078 .release = mc_attr_release, 1078 .release = mc_attr_release,
1079}; 1079};
1080/* 1080/*
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index d36cc8498084..c16c3b931b3d 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device)
1094 kfree(device); 1094 kfree(device);
1095} 1095}
1096 1096
1097static struct device_type addrmatch_type = { 1097static const struct device_type addrmatch_type = {
1098 .groups = addrmatch_groups, 1098 .groups = addrmatch_groups,
1099 .release = addrmatch_release, 1099 .release = addrmatch_release,
1100}; 1100};
@@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device *device)
1125 kfree(device); 1125 kfree(device);
1126} 1126}
1127 1127
1128static struct device_type all_channel_counts_type = { 1128static const struct device_type all_channel_counts_type = {
1129 .groups = all_channel_counts_groups, 1129 .groups = all_channel_counts_groups,
1130 .release = all_channel_counts_release, 1130 .release = all_channel_counts_release,
1131}; 1131};