From 93160c6397e460bc4c7ac15323fb698f91ef02e5 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Mon, 9 Jul 2007 11:39:19 -0700 Subject: 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 Cc: Greg KH Cc: David Brownell Acked-by: Russell King Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- arch/arm/common/locomo.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'arch/arm/common/locomo.c') diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index cfe6f4650bc9..ae21755872ed 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; -- cgit