aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2013-04-30 05:47:16 -0400
committerBorislav Petkov <bp@suse.de>2013-05-09 06:40:45 -0400
commitc8c64d165ccfd2274058ac84e0c680f9b48c4ec1 (patch)
tree83d1831be5946a304b5d9d1551813832e2633eb3 /drivers/edac
parent8b7719e08a42079d333f902fdbf5823ea9636d65 (diff)
EDAC: Don't give write permission to read-only files
I get the following warning on boot: ------------[ cut here ]------------ WARNING: at drivers/base/core.c:575 device_create_file+0x9a/0xa0() Hardware name: -[8737R2A]- Write permission without 'store' ... </snip> Drilling down, this is related to dynamic channel ce_count attribute files sporting a S_IWUSR mode without a ->store() function. Looking around, it appears that they aren't supposed to have a ->store() function. So remove the bogus write permission to get rid of the warning. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: <stable@vger.kernel.org> # 3.[89] [ shorten commit message ] Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/edac_mc_sysfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index f6e81b285b4a..67610a6ebf87 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -327,17 +327,17 @@ static struct device_attribute *dynamic_csrow_dimm_attr[] = {
327}; 327};
328 328
329/* possible dynamic channel ce_count attribute files */ 329/* possible dynamic channel ce_count attribute files */
330DEVICE_CHANNEL(ch0_ce_count, S_IRUGO | S_IWUSR, 330DEVICE_CHANNEL(ch0_ce_count, S_IRUGO,
331 channel_ce_count_show, NULL, 0); 331 channel_ce_count_show, NULL, 0);
332DEVICE_CHANNEL(ch1_ce_count, S_IRUGO | S_IWUSR, 332DEVICE_CHANNEL(ch1_ce_count, S_IRUGO,
333 channel_ce_count_show, NULL, 1); 333 channel_ce_count_show, NULL, 1);
334DEVICE_CHANNEL(ch2_ce_count, S_IRUGO | S_IWUSR, 334DEVICE_CHANNEL(ch2_ce_count, S_IRUGO,
335 channel_ce_count_show, NULL, 2); 335 channel_ce_count_show, NULL, 2);
336DEVICE_CHANNEL(ch3_ce_count, S_IRUGO | S_IWUSR, 336DEVICE_CHANNEL(ch3_ce_count, S_IRUGO,
337 channel_ce_count_show, NULL, 3); 337 channel_ce_count_show, NULL, 3);
338DEVICE_CHANNEL(ch4_ce_count, S_IRUGO | S_IWUSR, 338DEVICE_CHANNEL(ch4_ce_count, S_IRUGO,
339 channel_ce_count_show, NULL, 4); 339 channel_ce_count_show, NULL, 4);
340DEVICE_CHANNEL(ch5_ce_count, S_IRUGO | S_IWUSR, 340DEVICE_CHANNEL(ch5_ce_count, S_IRUGO,
341 channel_ce_count_show, NULL, 5); 341 channel_ce_count_show, NULL, 5);
342 342
343/* Total possible dynamic ce_count attribute file table */ 343/* Total possible dynamic ce_count attribute file table */