static spinlock_t resume_reason_lock;
static ssize_t reason_show(struct kobject *kobj, struct kobj_attribute *attr,
- const char *buf, size_t count)
+ char *buf)
{
int irq_no, buf_offset = 0;
struct irq_desc *desc;
/* Initializes the sysfs parameter
* registers the pm_event notifier
*/
-void __init wakeup_reason_init(void)
+int __init wakeup_reason_init(void)
{
int retval;
spin_lock_init(&resume_reason_lock);
if (!wakeup_reason) {
printk(KERN_WARNING "[%s] failed to create a sysfs kobject\n",
__func__);
- return;
+ return 1;
}
retval = sysfs_create_group(wakeup_reason, &attr_group);
if (retval) {
printk(KERN_WARNING "[%s] failed to create a sysfs group %d\n",
__func__, retval);
}
+ return 0;
}
late_initcall(wakeup_reason_init);