diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-03 23:15:57 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-03 23:15:57 -0400 |
| commit | 4d578573b8328ce5aa6500b955444b89afa3c72c (patch) | |
| tree | 13b839d10dfc7e886515e2ef9e91fe7881700545 /drivers/rtc/rtc-cmos.c | |
| parent | 68e3e92620c323703bc7db75c2ba15239ee85c39 (diff) | |
| parent | dbe9a2edd17d843d80faf2b99f20a691c1853418 (diff) | |
Merge branch 'pm-acpi' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull some left-over PM patches from Rafael J. Wysocki.
* 'pm-acpi' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / PM: Make acpi_pm_device_sleep_state() follow the specification
ACPI / PM: Make __acpi_bus_get_power() cover D3cold correctly
ACPI / PM: Fix error messages in drivers/acpi/bus.c
rtc-cmos / PM: report wakeup event on ACPI RTC alarm
ACPI / PM: Generate wakeup events on fixed power button
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
| -rw-r--r-- | drivers/rtc/rtc-cmos.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 7d5f56edb8ef..4267789ca995 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
| @@ -910,14 +910,17 @@ static inline int cmos_poweroff(struct device *dev) | |||
| 910 | 910 | ||
| 911 | static u32 rtc_handler(void *context) | 911 | static u32 rtc_handler(void *context) |
| 912 | { | 912 | { |
| 913 | struct device *dev = context; | ||
| 914 | |||
| 915 | pm_wakeup_event(dev, 0); | ||
| 913 | acpi_clear_event(ACPI_EVENT_RTC); | 916 | acpi_clear_event(ACPI_EVENT_RTC); |
| 914 | acpi_disable_event(ACPI_EVENT_RTC, 0); | 917 | acpi_disable_event(ACPI_EVENT_RTC, 0); |
| 915 | return ACPI_INTERRUPT_HANDLED; | 918 | return ACPI_INTERRUPT_HANDLED; |
| 916 | } | 919 | } |
| 917 | 920 | ||
| 918 | static inline void rtc_wake_setup(void) | 921 | static inline void rtc_wake_setup(struct device *dev) |
| 919 | { | 922 | { |
| 920 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); | 923 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev); |
| 921 | /* | 924 | /* |
| 922 | * After the RTC handler is installed, the Fixed_RTC event should | 925 | * After the RTC handler is installed, the Fixed_RTC event should |
| 923 | * be disabled. Only when the RTC alarm is set will it be enabled. | 926 | * be disabled. Only when the RTC alarm is set will it be enabled. |
| @@ -950,7 +953,7 @@ cmos_wake_setup(struct device *dev) | |||
| 950 | if (acpi_disabled) | 953 | if (acpi_disabled) |
| 951 | return; | 954 | return; |
| 952 | 955 | ||
| 953 | rtc_wake_setup(); | 956 | rtc_wake_setup(dev); |
| 954 | acpi_rtc_info.wake_on = rtc_wake_on; | 957 | acpi_rtc_info.wake_on = rtc_wake_on; |
| 955 | acpi_rtc_info.wake_off = rtc_wake_off; | 958 | acpi_rtc_info.wake_off = rtc_wake_off; |
| 956 | 959 | ||
