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) ...@@ -270,8 +270,6 @@ static int __init acpi_sleep_init(void)
} }
printk(")\n"); printk(")\n");
acpi_sleep_proc_init();
return_VALUE(0); return_VALUE(0);
} }
......
...@@ -67,7 +67,7 @@ acpi_system_write_sleep ( ...@@ -67,7 +67,7 @@ acpi_system_write_sleep (
goto Done; goto Done;
if (!sleep_states[state]) if (!sleep_states[state])
return_VALUE(-ENODEV); goto Done;
#ifdef CONFIG_SOFTWARE_SUSPEND #ifdef CONFIG_SOFTWARE_SUSPEND
if (state == 4) { if (state == 4) {
...@@ -375,7 +375,7 @@ static struct file_operations acpi_system_alarm_fops = { ...@@ -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; struct proc_dir_entry *entry = NULL;
...@@ -392,3 +392,5 @@ int acpi_sleep_proc_init(void) ...@@ -392,3 +392,5 @@ int acpi_sleep_proc_init(void)
entry->proc_fops = &acpi_system_alarm_fops; entry->proc_fops = &acpi_system_alarm_fops;
return 0; return 0;
} }
late_initcall(acpi_sleep_proc_init);
...@@ -3,11 +3,3 @@ extern u8 sleep_states[]; ...@@ -3,11 +3,3 @@ extern u8 sleep_states[];
extern acpi_status acpi_suspend (u32 state); 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