[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>
This commit is contained in:
Russell King
2005-10-28 09:52:56 -07:00
committed by Greg Kroah-Hartman
parent a3a3395e48
commit 9480e307cd
66 changed files with 321 additions and 688 deletions

View File

@@ -329,27 +329,13 @@ static int __devexit omap_cf_remove(struct device *dev)
return 0;
}
static int omap_cf_suspend(struct device *dev, pm_message_t mesg, u32 level)
{
if (level != SUSPEND_SAVE_STATE)
return 0;
return pcmcia_socket_dev_suspend(dev, mesg);
}
static int omap_cf_resume(struct device *dev, u32 level)
{
if (level != RESUME_RESTORE_STATE)
return 0;
return pcmcia_socket_dev_resume(dev);
}
static struct device_driver omap_cf_driver = {
.name = (char *) driver_name,
.bus = &platform_bus_type,
.probe = omap_cf_probe,
.remove = __devexit_p(omap_cf_remove),
.suspend = omap_cf_suspend,
.resume = omap_cf_resume,
.suspend = pcmcia_socket_dev_suspend,
.resume = pcmcia_socket_dev_resume,
};
static int __init omap_cf_init(void)