diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/bay.c | 3 | ||||
-rw-r--r-- | drivers/acpi/dock.c | 3 | ||||
-rw-r--r-- | drivers/acpi/glue.c | 3 | ||||
-rw-r--r-- | drivers/acpi/sleep/main.c | 5 | ||||
-rw-r--r-- | drivers/acpi/sleep/proc.c | 5 |
5 files changed, 15 insertions, 4 deletions
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c index 26038c2a2a71..61b6c5beb2d3 100644 --- a/drivers/acpi/bay.c +++ b/drivers/acpi/bay.c | |||
@@ -377,6 +377,9 @@ static int __init bay_init(void) | |||
377 | 377 | ||
378 | INIT_LIST_HEAD(&drive_bays); | 378 | INIT_LIST_HEAD(&drive_bays); |
379 | 379 | ||
380 | if (acpi_disabled) | ||
381 | return -ENODEV; | ||
382 | |||
380 | /* look for dockable drive bays */ | 383 | /* look for dockable drive bays */ |
381 | acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, | 384 | acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, |
382 | ACPI_UINT32_MAX, find_bay, &bays, NULL); | 385 | ACPI_UINT32_MAX, find_bay, &bays, NULL); |
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 96c542f7fded..bb7c51f712bd 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -917,6 +917,9 @@ static int __init dock_init(void) | |||
917 | 917 | ||
918 | dock_station = NULL; | 918 | dock_station = NULL; |
919 | 919 | ||
920 | if (acpi_disabled) | ||
921 | return 0; | ||
922 | |||
920 | /* look for a dock station */ | 923 | /* look for a dock station */ |
921 | acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, | 924 | acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, |
922 | ACPI_UINT32_MAX, find_dock, &num, NULL); | 925 | ACPI_UINT32_MAX, find_dock, &num, NULL); |
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 2808dc60fd67..9b227d4dc9c9 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -333,6 +333,9 @@ static int __init acpi_rtc_init(void) | |||
333 | { | 333 | { |
334 | struct device *dev = get_rtc_dev(); | 334 | struct device *dev = get_rtc_dev(); |
335 | 335 | ||
336 | if (acpi_disabled) | ||
337 | return 0; | ||
338 | |||
336 | if (dev) { | 339 | if (dev) { |
337 | rtc_wake_setup(); | 340 | rtc_wake_setup(); |
338 | rtc_info.wake_on = rtc_wake_on; | 341 | rtc_info.wake_on = rtc_wake_on; |
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index c3b0cd88d09f..495c63a3e0af 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -36,9 +36,8 @@ static int acpi_sleep_prepare(u32 acpi_state) | |||
36 | if (!acpi_wakeup_address) { | 36 | if (!acpi_wakeup_address) { |
37 | return -EFAULT; | 37 | return -EFAULT; |
38 | } | 38 | } |
39 | acpi_set_firmware_waking_vector((acpi_physical_address) | 39 | acpi_set_firmware_waking_vector( |
40 | virt_to_phys((void *) | 40 | (acpi_physical_address)acpi_wakeup_address); |
41 | acpi_wakeup_address)); | ||
42 | 41 | ||
43 | } | 42 | } |
44 | ACPI_FLUSH_CPU_CACHE(); | 43 | ACPI_FLUSH_CPU_CACHE(); |
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 224c57c03381..4ebbba2b6b19 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
@@ -315,8 +315,11 @@ acpi_system_write_alarm(struct file *file, | |||
315 | cmos_bcd_write(day, acpi_gbl_FADT.day_alarm, rtc_control); | 315 | cmos_bcd_write(day, acpi_gbl_FADT.day_alarm, rtc_control); |
316 | if (acpi_gbl_FADT.month_alarm) | 316 | if (acpi_gbl_FADT.month_alarm) |
317 | cmos_bcd_write(mo, acpi_gbl_FADT.month_alarm, rtc_control); | 317 | cmos_bcd_write(mo, acpi_gbl_FADT.month_alarm, rtc_control); |
318 | if (acpi_gbl_FADT.century) | 318 | if (acpi_gbl_FADT.century) { |
319 | if (adjust) | ||
320 | yr += cmos_bcd_read(acpi_gbl_FADT.century, rtc_control) * 100; | ||
319 | cmos_bcd_write(yr / 100, acpi_gbl_FADT.century, rtc_control); | 321 | cmos_bcd_write(yr / 100, acpi_gbl_FADT.century, rtc_control); |
322 | } | ||
320 | /* enable the rtc alarm interrupt */ | 323 | /* enable the rtc alarm interrupt */ |
321 | rtc_control |= RTC_AIE; | 324 | rtc_control |= RTC_AIE; |
322 | CMOS_WRITE(rtc_control, RTC_CONTROL); | 325 | CMOS_WRITE(rtc_control, RTC_CONTROL); |