diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-07-09 14:39:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:02 -0400 |
commit | 93160c6397e460bc4c7ac15323fb698f91ef02e5 (patch) | |
tree | a05bdf42947b72dd4fc6458a9325a6af9ffcbf8b /arch/arm/mach-sa1100/neponset.c | |
parent | 43a49f8baa6b0e7e5b68ed0ee141e1efacfd9ae6 (diff) |
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/mach-sa1100/neponset.c')
-rw-r--r-- | arch/arm/mach-sa1100/neponset.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 4cbf9468f654..3a0a1ee2542d 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -185,28 +185,21 @@ static int __devinit neponset_probe(struct platform_device *dev) | |||
185 | /* | 185 | /* |
186 | * LDM power management. | 186 | * LDM power management. |
187 | */ | 187 | */ |
188 | static unsigned int neponset_saved_state; | ||
189 | |||
188 | static int neponset_suspend(struct platform_device *dev, pm_message_t state) | 190 | static int neponset_suspend(struct platform_device *dev, pm_message_t state) |
189 | { | 191 | { |
190 | /* | 192 | /* |
191 | * Save state. | 193 | * Save state. |
192 | */ | 194 | */ |
193 | if (!dev->dev.power.saved_state) | 195 | neponset_saved_state = NCR_0; |
194 | dev->dev.power.saved_state = kmalloc(sizeof(unsigned int), GFP_KERNEL); | ||
195 | if (!dev->dev.power.saved_state) | ||
196 | return -ENOMEM; | ||
197 | |||
198 | *(unsigned int *)dev->dev.power.saved_state = NCR_0; | ||
199 | 196 | ||
200 | return 0; | 197 | return 0; |
201 | } | 198 | } |
202 | 199 | ||
203 | static int neponset_resume(struct platform_device *dev) | 200 | static int neponset_resume(struct platform_device *dev) |
204 | { | 201 | { |
205 | if (dev->dev.power.saved_state) { | 202 | NCR_0 = neponset_saved_state; |
206 | NCR_0 = *(unsigned int *)dev->dev.power.saved_state; | ||
207 | kfree(dev->dev.power.saved_state); | ||
208 | dev->dev.power.saved_state = NULL; | ||
209 | } | ||
210 | 203 | ||
211 | return 0; | 204 | return 0; |
212 | } | 205 | } |