Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310433
b: refs/heads/master
c: b2201e5
h: refs/heads/master
i:
  310431: 466e51a
v: v3
  • Loading branch information
Daniel Drake authored and Rafael J. Wysocki committed May 29, 2012
1 parent 4b107b8 commit d47f431
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c10d7a13846bffa5c77f1122500b687ab902e2d2
refs/heads/master: b2201e5482bc2376ea5c049442850a260142ac40
9 changes: 6 additions & 3 deletions trunk/drivers/rtc/rtc-cmos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit d47f431

Please sign in to comment.