aboutsummaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorRuchi Kandoi <kandoiruchi@google.com>2014-04-24 14:31:57 -0700
committerJohn Stultz <john.stultz@linaro.org>2016-02-16 13:53:37 -0800
commit4407d13a09440957991b89471e635c3fffc91a21 (patch)
tree3c54179948e83a8331768a3358d0e852be76fa2d /kernel/power
parent5753c931919fcedc765d20a01bf957a1218d0799 (diff)
Power: Changes the permission to read only for sysfs file /sys/kernel/wakeup_reasons/last_resume_reason
Change-Id: I8ac568a7cb58c31decd379195de517ff3c6f9c65 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/wakeup_reason.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/power/wakeup_reason.c b/kernel/power/wakeup_reason.c
index 188a6bfacf5a..187e4e9105fb 100644
--- a/kernel/power/wakeup_reason.c
+++ b/kernel/power/wakeup_reason.c
@@ -34,7 +34,7 @@ static int irqcount;
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,