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/common/sa1111.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/common/sa1111.c')
-rw-r--r-- | arch/arm/common/sa1111.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 798bbfccafb7..eb06d0b2cb74 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -51,6 +51,9 @@ struct sa1111 { | |||
51 | int irq; | 51 | int irq; |
52 | spinlock_t lock; | 52 | spinlock_t lock; |
53 | void __iomem *base; | 53 | void __iomem *base; |
54 | #ifdef CONFIG_PM | ||
55 | void *saved_state; | ||
56 | #endif | ||
54 | }; | 57 | }; |
55 | 58 | ||
56 | /* | 59 | /* |
@@ -822,7 +825,7 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state) | |||
822 | save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); | 825 | save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); |
823 | if (!save) | 826 | if (!save) |
824 | return -ENOMEM; | 827 | return -ENOMEM; |
825 | dev->dev.power.saved_state = save; | 828 | sachip->saved_state = save; |
826 | 829 | ||
827 | spin_lock_irqsave(&sachip->lock, flags); | 830 | spin_lock_irqsave(&sachip->lock, flags); |
828 | 831 | ||
@@ -878,7 +881,7 @@ static int sa1111_resume(struct platform_device *dev) | |||
878 | unsigned long flags, id; | 881 | unsigned long flags, id; |
879 | void __iomem *base; | 882 | void __iomem *base; |
880 | 883 | ||
881 | save = (struct sa1111_save_data *)dev->dev.power.saved_state; | 884 | save = sachip->saved_state; |
882 | if (!save) | 885 | if (!save) |
883 | return 0; | 886 | return 0; |
884 | 887 | ||
@@ -923,7 +926,7 @@ static int sa1111_resume(struct platform_device *dev) | |||
923 | 926 | ||
924 | spin_unlock_irqrestore(&sachip->lock, flags); | 927 | spin_unlock_irqrestore(&sachip->lock, flags); |
925 | 928 | ||
926 | dev->dev.power.saved_state = NULL; | 929 | sachip->saved_state = NULL; |
927 | kfree(save); | 930 | kfree(save); |
928 | 931 | ||
929 | return 0; | 932 | return 0; |
@@ -958,8 +961,8 @@ static int sa1111_remove(struct platform_device *pdev) | |||
958 | platform_set_drvdata(pdev, NULL); | 961 | platform_set_drvdata(pdev, NULL); |
959 | 962 | ||
960 | #ifdef CONFIG_PM | 963 | #ifdef CONFIG_PM |
961 | kfree(pdev->dev.power.saved_state); | 964 | kfree(sachip->saved_state); |
962 | pdev->dev.power.saved_state = NULL; | 965 | sachip->saved_state = NULL; |
963 | #endif | 966 | #endif |
964 | } | 967 | } |
965 | 968 | ||