[patch 2.6.24-git] rtc: remove more dev->power.power_state usage

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <rtc-linux@...>, lkml <linux-kernel@...>, Russell King <rmk@...>
Date: Friday, February 1, 2008 - 5:08 pm

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>
---
 drivers/rtc/rtc-sa1100.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

--- at91.orig/drivers/rtc/rtc-sa1100.c	2008-02-01 12:31:16.000000000 -0800
+++ at91/drivers/rtc/rtc-sa1100.c	2008-02-01 12:32:14.000000000 -0800
@@ -357,23 +357,15 @@ static int sa1100_rtc_remove(struct plat
 #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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 2.6.24-git] rtc: remove more dev->power.power_stat..., David Brownell, (Fri Feb 1, 5:08 pm)