Commit 58e79bac authored by Patrick Mochel's avatar Patrick Mochel

acpi sleep: demote sleep proc file creation.

- 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.
parent ddb47f6d
......@@ -270,8 +270,6 @@ static int __init acpi_sleep_init(void)
}
printk(")\n");
acpi_sleep_proc_init();
return_VALUE(0);
}
......
......@@ -66,8 +66,8 @@ acpi_system_write_sleep (
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) {
......@@ -375,7 +375,7 @@ static struct file_operations acpi_system_alarm_fops = {
};
int acpi_sleep_proc_init(void)
static int acpi_sleep_proc_init(void)
{
struct proc_dir_entry *entry = NULL;
......@@ -392,3 +392,5 @@ int acpi_sleep_proc_init(void)
entry->proc_fops = &acpi_system_alarm_fops;
return 0;
}
late_initcall(acpi_sleep_proc_init);
......@@ -3,11 +3,3 @@ extern u8 sleep_states[];
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment