EDAC: Don't give write permission to read-only files
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Tue, 30 Apr 2013 09:47:16 +0000 (15:17 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 May 2013 14:18:37 +0000 (07:18 -0700)
commitf2e426a46a35a8cd30c7c7c39e099f7bd857ce0b
tree3cc3841846964ea84405f69295c4a80af7bb6977
parentd2775711193f1bad066bc5349969ec0bcc9dccb1
EDAC: Don't give write permission to read-only files

commit c8c64d165ccfd2274058ac84e0c680f9b48c4ec1 upstream.

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>
[ shorten commit message ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/edac/edac_mc_sysfs.c