diff options
Diffstat (limited to 'drivers/acpi/ac.c')
-rw-r--r-- | drivers/acpi/ac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 24ccf81d135f..11abc7bf777e 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -72,7 +72,7 @@ struct acpi_ac { unsigned long state; }; -static struct file_operations acpi_ac_fops = { +static const struct file_operations acpi_ac_fops = { .open = acpi_ac_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -285,6 +285,8 @@ static int __init acpi_ac_init(void) { int result; + if (acpi_disabled) + return -ENODEV; acpi_ac_dir = acpi_lock_ac_dir(); if (!acpi_ac_dir) |