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
This commit is contained in:
@@ -910,14 +910,17 @@ static inline int cmos_poweroff(struct device *dev)
|
||||
|
||||
static u32 rtc_handler(void *context)
|
||||
{
|
||||
struct device *dev = context;
|
||||
|
||||
pm_wakeup_event(dev, 0);
|
||||
acpi_clear_event(ACPI_EVENT_RTC);
|
||||
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
||||
return ACPI_INTERRUPT_HANDLED;
|
||||
}
|
||||
|
||||
static inline void rtc_wake_setup(void)
|
||||
static inline void rtc_wake_setup(struct device *dev)
|
||||
{
|
||||
acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL);
|
||||
acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev);
|
||||
/*
|
||||
* After the RTC handler is installed, the Fixed_RTC event should
|
||||
* be disabled. Only when the RTC alarm is set will it be enabled.
|
||||
@@ -950,7 +953,7 @@ cmos_wake_setup(struct device *dev)
|
||||
if (acpi_disabled)
|
||||
return;
|
||||
|
||||
rtc_wake_setup();
|
||||
rtc_wake_setup(dev);
|
||||
acpi_rtc_info.wake_on = rtc_wake_on;
|
||||
acpi_rtc_info.wake_off = rtc_wake_off;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user