[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

@ -571,23 +571,23 @@ static int pxamci_remove(struct device *dev)
}
#ifdef CONFIG_PM
static int pxamci_suspend(struct device *dev, pm_message_t state, u32 level)
static int pxamci_suspend(struct device *dev, pm_message_t state)
{
struct mmc_host *mmc = dev_get_drvdata(dev);
int ret = 0;
if (mmc && level == SUSPEND_DISABLE)
if (mmc)
ret = mmc_suspend_host(mmc, state);
return ret;
}
static int pxamci_resume(struct device *dev, u32 level)
static int pxamci_resume(struct device *dev)
{
struct mmc_host *mmc = dev_get_drvdata(dev);
int ret = 0;
if (mmc && level == RESUME_ENABLE)
if (mmc)
ret = mmc_resume_host(mmc);
return ret;

View File

@ -1955,14 +1955,14 @@ static void __devexit wbsd_pnp_remove(struct pnp_dev * dev)
*/
#ifdef CONFIG_PM
static int wbsd_suspend(struct device *dev, pm_message_t state, u32 level)
static int wbsd_suspend(struct device *dev, pm_message_t state)
{
DBGF("Not yet supported\n");
return 0;
}
static int wbsd_resume(struct device *dev, u32 level)
static int wbsd_resume(struct device *dev)
{
DBGF("Not yet supported\n");