diff options
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r-- | drivers/acpi/glue.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 87c5d456e180..0f2dd81736bd 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -274,6 +274,12 @@ static u32 rtc_handler(void *context) | |||
274 | static inline void rtc_wake_setup(void) | 274 | static inline void rtc_wake_setup(void) |
275 | { | 275 | { |
276 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); | 276 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); |
277 | /* | ||
278 | * After the RTC handler is installed, the Fixed_RTC event should | ||
279 | * be disabled. Only when the RTC alarm is set will it be enabled. | ||
280 | */ | ||
281 | acpi_clear_event(ACPI_EVENT_RTC); | ||
282 | acpi_disable_event(ACPI_EVENT_RTC, 0); | ||
277 | } | 283 | } |
278 | 284 | ||
279 | static void rtc_wake_on(struct device *dev) | 285 | static void rtc_wake_on(struct device *dev) |
@@ -329,6 +335,12 @@ static int __init acpi_rtc_init(void) | |||
329 | { | 335 | { |
330 | struct device *dev = get_rtc_dev(); | 336 | struct device *dev = get_rtc_dev(); |
331 | 337 | ||
338 | if (acpi_disabled) | ||
339 | return 0; | ||
340 | |||
341 | if (acpi_disabled) | ||
342 | return 0; | ||
343 | |||
332 | if (dev) { | 344 | if (dev) { |
333 | rtc_wake_setup(); | 345 | rtc_wake_setup(); |
334 | rtc_info.wake_on = rtc_wake_on; | 346 | rtc_info.wake_on = rtc_wake_on; |