aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/omap_cf.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/pcmcia/omap_cf.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/pcmcia/omap_cf.c')
-rw-r--r--drivers/pcmcia/omap_cf.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 94be9e51654e..2558c3cc91ec 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -329,27 +329,13 @@ static int __devexit omap_cf_remove(struct device *dev)
329 return 0; 329 return 0;
330} 330}
331 331
332static int omap_cf_suspend(struct device *dev, pm_message_t mesg, u32 level)
333{
334 if (level != SUSPEND_SAVE_STATE)
335 return 0;
336 return pcmcia_socket_dev_suspend(dev, mesg);
337}
338
339static int omap_cf_resume(struct device *dev, u32 level)
340{
341 if (level != RESUME_RESTORE_STATE)
342 return 0;
343 return pcmcia_socket_dev_resume(dev);
344}
345
346static struct device_driver omap_cf_driver = { 332static struct device_driver omap_cf_driver = {
347 .name = (char *) driver_name, 333 .name = (char *) driver_name,
348 .bus = &platform_bus_type, 334 .bus = &platform_bus_type,
349 .probe = omap_cf_probe, 335 .probe = omap_cf_probe,
350 .remove = __devexit_p(omap_cf_remove), 336 .remove = __devexit_p(omap_cf_remove),
351 .suspend = omap_cf_suspend, 337 .suspend = pcmcia_socket_dev_suspend,
352 .resume = omap_cf_resume, 338 .resume = pcmcia_socket_dev_resume,
353}; 339};
354 340
355static int __init omap_cf_init(void) 341static int __init omap_cf_init(void)