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 { | |||
72 | unsigned long state; | 72 | unsigned long state; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | static struct file_operations acpi_ac_fops = { | 75 | static const struct file_operations acpi_ac_fops = { |
76 | .open = acpi_ac_open_fs, | 76 | .open = acpi_ac_open_fs, |
77 | .read = seq_read, | 77 | .read = seq_read, |
78 | .llseek = seq_lseek, | 78 | .llseek = seq_lseek, |
@@ -285,6 +285,8 @@ static int __init acpi_ac_init(void) | |||
285 | { | 285 | { |
286 | int result; | 286 | int result; |
287 | 287 | ||
288 | if (acpi_disabled) | ||
289 | return -ENODEV; | ||
288 | 290 | ||
289 | acpi_ac_dir = acpi_lock_ac_dir(); | 291 | acpi_ac_dir = acpi_lock_ac_dir(); |
290 | if (!acpi_ac_dir) | 292 | if (!acpi_ac_dir) |