diff options
author | Ruchi Kandoi <kandoiruchi@google.com> | 2014-04-24 14:31:57 -0700 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-03-11 15:56:48 +0100 |
commit | 00b44ccd051cb74179e504e3843a7959cb8fa387 (patch) | |
tree | 9a86d3d7f7eb257526404e64b723262b29d9dad3 | |
parent | 0a2cd858e4cd310ca2387d6cf5a1228a0a0ec1a8 (diff) | |
download | kernel_samsung_espresso10-00b44ccd051cb74179e504e3843a7959cb8fa387.zip kernel_samsung_espresso10-00b44ccd051cb74179e504e3843a7959cb8fa387.tar.gz kernel_samsung_espresso10-00b44ccd051cb74179e504e3843a7959cb8fa387.tar.bz2 |
Power: Changes the permission to read only for sysfs file
/sys/kernel/wakeup_reasons/last_resume_reason
Change-Id: If25e8e416ee9726996518b58b6551a61dc1591e3
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
-rw-r--r-- | kernel/power/wakeup_reason.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/power/wakeup_reason.c b/kernel/power/wakeup_reason.c index 82e69fe..9823d9c 100644 --- a/kernel/power/wakeup_reason.c +++ b/kernel/power/wakeup_reason.c @@ -34,7 +34,7 @@ static int irq_count; static struct kobject *wakeup_reason; static spinlock_t resume_reason_lock; -static ssize_t reason_show(struct kobject *kobj, struct kobj_attribute *attr, +static ssize_t last_resume_reason_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { int irq_no, buf_offset = 0; @@ -53,8 +53,7 @@ static ssize_t reason_show(struct kobject *kobj, struct kobj_attribute *attr, return buf_offset; } -static struct kobj_attribute resume_reason = __ATTR(last_resume_reason, 0666, - reason_show, NULL); +static struct kobj_attribute resume_reason = __ATTR_RO(last_resume_reason); static struct attribute *attrs[] = { &resume_reason.attr, |