From: Shaohua Li Date: Sun, 19 Oct 2008 03:27:12 +0000 (-0700) Subject: memory_probe: fix wrong sysfs file attribute X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f1b16a51ea7180eca8a0d76a6bd587385a30757;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git memory_probe: fix wrong sysfs file attribute This attribute just has a write operation. [akpm@linux-foundation.org: use S_IWUSR as suggested by Randy] Signed-off-by: Shaohua Li Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/base/memory.c b/drivers/base/memory.c index af0d175c025d..5260e9e0df48 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -21,6 +21,8 @@ #include #include #include +#include + #include #include @@ -325,7 +327,7 @@ memory_probe_store(struct class *class, const char *buf, size_t count) return count; } -static CLASS_ATTR(probe, 0700, NULL, memory_probe_store); +static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store); static int memory_probe_init(void) {