summaryrefslogtreecommitdiffstats
path: root/arch/arm/common/locomo.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-07-09 11:39:19 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 16:09:02 -0700
commit93160c6397e460bc4c7ac15323fb698f91ef02e5 (patch)
treea05bdf42947b72dd4fc6458a9325a6af9ffcbf8b /arch/arm/common/locomo.c
parent43a49f8baa6b0e7e5b68ed0ee141e1efacfd9ae6 (diff)
downloadop-kernel-dev-93160c6397e460bc4c7ac15323fb698f91ef02e5.zip
op-kernel-dev-93160c6397e460bc4c7ac15323fb698f91ef02e5.tar.gz
PM: do not use saved_state from struct dev_pm_info on ARM
The saved_state member of 'struct dev_pm_info' that's going to be removed is used in arch/arm/common/locomo.c, arch/arm/common/sa1111.c and arch/arm/mach-sa1100/neponset.c. Change the code in there to use local variables for saving the state of devices during suspend. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Greg KH <greg@kroah.com> Cc: David Brownell <david-b@pacbell.net> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/common/locomo.c')
-rw-r--r--arch/arm/common/locomo.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index cfe6f46..ae21755 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -60,6 +60,9 @@ struct locomo {
unsigned int irq;
spinlock_t lock;
void __iomem *base;
+#ifdef CONFIG_PM
+ void *saved_state;
+#endif
};
struct locomo_dev_info {
@@ -565,7 +568,7 @@ static int locomo_suspend(struct platform_device *dev, pm_message_t state)
if (!save)
return -ENOMEM;
- dev->dev.power.saved_state = (void *) save;
+ lchip->saved_state = save;
spin_lock_irqsave(&lchip->lock, flags);
@@ -605,8 +608,8 @@ static int locomo_resume(struct platform_device *dev)
struct locomo_save_data *save;
unsigned long r;
unsigned long flags;
-
- save = (struct locomo_save_data *) dev->dev.power.saved_state;
+
+ save = lchip->saved_state;
if (!save)
return 0;
@@ -628,6 +631,8 @@ static int locomo_resume(struct platform_device *dev)
locomo_writel(0x1, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KCMD);
spin_unlock_irqrestore(&lchip->lock, flags);
+
+ lchip->saved_state = NULL;
kfree(save);
return 0;
OpenPOWER on IntegriCloud