aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mcp-sa11x0.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 /drivers/mfd/mcp-sa11x0.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 'drivers/mfd/mcp-sa11x0.c')
-rw-r--r--drivers/mfd/mcp-sa11x0.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index e9806fbbe696..720e7a326308 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -219,26 +219,24 @@ static int mcp_sa11x0_remove(struct device *dev)
219 return 0; 219 return 0;
220} 220}
221 221
222static int mcp_sa11x0_suspend(struct device *dev, pm_message_t state, u32 level) 222static int mcp_sa11x0_suspend(struct device *dev, pm_message_t state)
223{ 223{
224 struct mcp *mcp = dev_get_drvdata(dev); 224 struct mcp *mcp = dev_get_drvdata(dev);
225 225
226 if (level == SUSPEND_DISABLE) { 226 priv(mcp)->mccr0 = Ser4MCCR0;
227 priv(mcp)->mccr0 = Ser4MCCR0; 227 priv(mcp)->mccr1 = Ser4MCCR1;
228 priv(mcp)->mccr1 = Ser4MCCR1; 228 Ser4MCCR0 &= ~MCCR0_MCE;
229 Ser4MCCR0 &= ~MCCR0_MCE; 229
230 }
231 return 0; 230 return 0;
232} 231}
233 232
234static int mcp_sa11x0_resume(struct device *dev, u32 level) 233static int mcp_sa11x0_resume(struct device *dev)
235{ 234{
236 struct mcp *mcp = dev_get_drvdata(dev); 235 struct mcp *mcp = dev_get_drvdata(dev);
237 236
238 if (level == RESUME_RESTORE_STATE) { 237 Ser4MCCR1 = priv(mcp)->mccr1;
239 Ser4MCCR1 = priv(mcp)->mccr1; 238 Ser4MCCR0 = priv(mcp)->mccr0;
240 Ser4MCCR0 = priv(mcp)->mccr0; 239
241 }
242 return 0; 240 return 0;
243} 241}
244 242