提交 f618258a 编写于 作者: D David Brownell 提交者: Linus Torvalds

rtc: remove more dev->power.power_state usage

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: NDavid Brownell <dbrownell@users.sourceforge.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8696e702
...@@ -357,23 +357,15 @@ static int sa1100_rtc_remove(struct platform_device *pdev) ...@@ -357,23 +357,15 @@ static int sa1100_rtc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sa1100_rtc_suspend(struct platform_device *pdev, pm_message_t state) static int sa1100_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{ {
if (pdev->dev.power.power_state.event != state.event) { if (device_may_wakeup(&pdev->dev))
if (state.event == PM_EVENT_SUSPEND && enable_irq_wake(IRQ_RTCAlrm);
device_may_wakeup(&pdev->dev))
enable_irq_wake(IRQ_RTCAlrm);
pdev->dev.power.power_state = state;
}
return 0; return 0;
} }
static int sa1100_rtc_resume(struct platform_device *pdev) 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))
if (device_may_wakeup(&pdev->dev)) disable_irq_wake(IRQ_RTCAlrm);
disable_irq_wake(IRQ_RTCAlrm);
pdev->dev.power.power_state = PMSG_ON;
}
return 0; return 0;
} }
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册