Power: Changes the permission to read only for sysfs file /sys/kernel/wakeup_reasons...
authorRuchi Kandoi <kandoiruchi@google.com>
Thu, 24 Apr 2014 21:31:57 +0000 (14:31 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:53:37 +0000 (13:53 -0800)
Change-Id: I8ac568a7cb58c31decd379195de517ff3c6f9c65
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
kernel/power/wakeup_reason.c

index 188a6bfacf5aa14a07368613557adc6d8d4e6096..187e4e9105fbb06d95b52446a6a7946a96de4da0 100644 (file)
@@ -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,