Skip to content

Commit

Permalink
rtc: remove more dev->power.power_state usage
Browse files Browse the repository at this point in the history
Remove some more references to dev->power.power_state.  That field is overdue
for removal, but we can't do that while it's still referenced in the kernel.
The only reason to update it was to make the /sys/devices/.../power/state
files (now removed) work better.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Brownell authored and Linus Torvalds committed Feb 6, 2008
1 parent 8696e70 commit f618258
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions drivers/rtc/rtc-sa1100.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,23 +357,15 @@ static int sa1100_rtc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM
static int sa1100_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{
if (pdev->dev.power.power_state.event != state.event) {
if (state.event == PM_EVENT_SUSPEND &&
device_may_wakeup(&pdev->dev))
enable_irq_wake(IRQ_RTCAlrm);

pdev->dev.power.power_state = state;
}
if (device_may_wakeup(&pdev->dev))
enable_irq_wake(IRQ_RTCAlrm);
return 0;
}

static int sa1100_rtc_resume(struct platform_device *pdev)
{
if (pdev->dev.power.power_state.event != PM_EVENT_ON) {
if (device_may_wakeup(&pdev->dev))
disable_irq_wake(IRQ_RTCAlrm);
pdev->dev.power.power_state = PMSG_ON;
}
if (device_may_wakeup(&pdev->dev))
disable_irq_wake(IRQ_RTCAlrm);
return 0;
}
#else
Expand Down

0 comments on commit f618258

Please sign in to comment.