- Make acpi_sleep_proc_init() a late_initcall(), and not called from
acpi_sleep_init(). This guarantees that the acpi proc hierarchy is at
least there when we create the dang file.
}
printk(")\n");
- acpi_sleep_proc_init();
-
return_VALUE(0);
}
if (state < 1 || state > 4)
goto Done;
- if (!sleep_states[state])
- return_VALUE(-ENODEV);
+ if (!sleep_states[state])
+ goto Done;
#ifdef CONFIG_SOFTWARE_SUSPEND
if (state == 4) {
};
-int acpi_sleep_proc_init(void)
+static int acpi_sleep_proc_init(void)
{
struct proc_dir_entry *entry = NULL;
entry->proc_fops = &acpi_system_alarm_fops;
return 0;
}
+
+late_initcall(acpi_sleep_proc_init);
extern acpi_status acpi_suspend (u32 state);
-#ifdef CONFIG_PROC_FS
-extern int acpi_sleep_proc_init(void);
-#else
-static inline int acpi_sleep_proc_init(void)
-{
- return 0;
-}
-#endif