diff --git a/kernel/power/wakeup_reason.c b/kernel/power/wakeup_reason.c
index 82e69fe52d0bd092bbae6e1dc459fada3557f9a4..9823d9ccde4eda23f3fa719f079161a874304f28 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,