aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/sa1111.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2005-10-28 12:52:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 12:52:56 -0400
commit9480e307cd88ef09ec9294c7d97ebec18e6d2221 (patch)
tree967e26d3a23c24dd52b114d672312c207714308c /arch/arm/common/sa1111.c
parenta3a3395e487abc4c1371fe319a8ecbb3913a70a4 (diff)
[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level. Then all devices were called at SUSPEND_SAVE_STATE level, and finally SUSPEND_POWER_DOWN level. However, with PM v2, to maintain compatibility for platform devices, I arranged for the PM v2 suspend/resume callbacks to call the old PM v1 suspend/resume callbacks three times with each level in order so that existing drivers continued to work. Since this is obsolete infrastructure which is no longer necessary, we can remove it. Here's an (untested) patch to do exactly that. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/common/sa1111.c')
-rw-r--r--arch/arm/common/sa1111.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 1a47fbf9cbbc..21e2a518ad3a 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -801,7 +801,7 @@ struct sa1111_save_data {
801 801
802#ifdef CONFIG_PM 802#ifdef CONFIG_PM
803 803
804static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level) 804static int sa1111_suspend(struct device *dev, pm_message_t state)
805{ 805{
806 struct sa1111 *sachip = dev_get_drvdata(dev); 806 struct sa1111 *sachip = dev_get_drvdata(dev);
807 struct sa1111_save_data *save; 807 struct sa1111_save_data *save;
@@ -809,9 +809,6 @@ static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
809 unsigned int val; 809 unsigned int val;
810 void __iomem *base; 810 void __iomem *base;
811 811
812 if (level != SUSPEND_DISABLE)
813 return 0;
814
815 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); 812 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
816 if (!save) 813 if (!save)
817 return -ENOMEM; 814 return -ENOMEM;
@@ -856,23 +853,19 @@ static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
856/* 853/*
857 * sa1111_resume - Restore the SA1111 device state. 854 * sa1111_resume - Restore the SA1111 device state.
858 * @dev: device to restore 855 * @dev: device to restore
859 * @level: resume level
860 * 856 *
861 * Restore the general state of the SA1111; clock control and 857 * Restore the general state of the SA1111; clock control and
862 * interrupt controller. Other parts of the SA1111 must be 858 * interrupt controller. Other parts of the SA1111 must be
863 * restored by their respective drivers, and must be called 859 * restored by their respective drivers, and must be called
864 * via LDM after this function. 860 * via LDM after this function.
865 */ 861 */
866static int sa1111_resume(struct device *dev, u32 level) 862static int sa1111_resume(struct device *dev)
867{ 863{
868 struct sa1111 *sachip = dev_get_drvdata(dev); 864 struct sa1111 *sachip = dev_get_drvdata(dev);
869 struct sa1111_save_data *save; 865 struct sa1111_save_data *save;
870 unsigned long flags, id; 866 unsigned long flags, id;
871 void __iomem *base; 867 void __iomem *base;
872 868
873 if (level != RESUME_ENABLE)
874 return 0;
875
876 save = (struct sa1111_save_data *)dev->power.saved_state; 869 save = (struct sa1111_save_data *)dev->power.saved_state;
877 if (!save) 870 if (!save)
878 return 0; 871 return 0;