[ARM] pxa: update pxamci.c to use 'struct dev_pm_ops'

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
This commit is contained in:
Mike Rapoport 2009-07-29 11:59:24 +03:00 committed by Eric Miao
parent 2ba9fd0d15
commit 33264f9745

View file

@ -804,20 +804,20 @@ static int pxamci_remove(struct platform_device *pdev)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int pxamci_suspend(struct platform_device *dev, pm_message_t state) static int pxamci_suspend(struct device *dev)
{ {
struct mmc_host *mmc = platform_get_drvdata(dev); struct mmc_host *mmc = dev_get_drvdata(dev);
int ret = 0; int ret = 0;
if (mmc) if (mmc)
ret = mmc_suspend_host(mmc, state); ret = mmc_suspend_host(mmc, PMSG_SUSPEND);
return ret; return ret;
} }
static int pxamci_resume(struct platform_device *dev) static int pxamci_resume(struct device *dev)
{ {
struct mmc_host *mmc = platform_get_drvdata(dev); struct mmc_host *mmc = dev_get_drvdata(dev);
int ret = 0; int ret = 0;
if (mmc) if (mmc)
@ -825,19 +825,22 @@ static int pxamci_resume(struct platform_device *dev)
return ret; return ret;
} }
#else
#define pxamci_suspend NULL static struct dev_pm_ops pxamci_pm_ops = {
#define pxamci_resume NULL .suspend = pxamci_suspend,
.resume = pxamci_resume,
};
#endif #endif
static struct platform_driver pxamci_driver = { static struct platform_driver pxamci_driver = {
.probe = pxamci_probe, .probe = pxamci_probe,
.remove = pxamci_remove, .remove = pxamci_remove,
.suspend = pxamci_suspend,
.resume = pxamci_resume,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &pxamci_pm_ops,
#endif
}, },
}; };