Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50d7fa9a authored by Ben Dooks's avatar Ben Dooks Committed by Linus Torvalds
Browse files

s3cmci: change to use dev_pm_ops



Move to using dev_pm_ops for suspend and resume.

Signed-off-by: default avatarBen Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 916a3077
Loading
Loading
Loading
Loading
+18 −11
Original line number Original line Diff line number Diff line
@@ -1546,35 +1546,42 @@ MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids);


#ifdef CONFIG_PM
#ifdef CONFIG_PM


static int s3cmci_suspend(struct platform_device *dev, pm_message_t state)
static int s3cmci_suspend(struct device *dev)
{
{
	struct mmc_host *mmc = platform_get_drvdata(dev);
	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
	struct pm_message event = { PM_EVENT_SUSPEND };


	return  mmc_suspend_host(mmc, state);
	return mmc_suspend_host(mmc, event);
}
}


static int s3cmci_resume(struct platform_device *dev)
static int s3cmci_resume(struct device *dev)
{
{
	struct mmc_host *mmc = platform_get_drvdata(dev);
	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));


	return mmc_resume_host(mmc);
	return mmc_resume_host(mmc);
}
}


static struct dev_pm_ops s3cmci_pm = {
	.suspend	= s3cmci_suspend,
	.resume		= s3cmci_resume,
};

#define s3cmci_pm_ops &s3cmci_pm
#else /* CONFIG_PM */
#else /* CONFIG_PM */
#define s3cmci_suspend NULL
#define s3cmci_pm_ops NULL
#define s3cmci_resume NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */




static struct platform_driver s3cmci_driver = {
static struct platform_driver s3cmci_driver = {
	.driver.name	= "s3c-sdi",
	.driver	= {
	.driver.owner	= THIS_MODULE,
		.name	= "s3c-sdi",
		.owner	= THIS_MODULE,
		.pm	= s3cmci_pm_ops,
	},
	.id_table	= s3cmci_driver_ids,
	.id_table	= s3cmci_driver_ids,
	.probe		= s3cmci_probe,
	.probe		= s3cmci_probe,
	.remove		= __devexit_p(s3cmci_remove),
	.remove		= __devexit_p(s3cmci_remove),
	.shutdown	= s3cmci_shutdown,
	.shutdown	= s3cmci_shutdown,
	.suspend	= s3cmci_suspend,
	.resume		= s3cmci_resume,
};
};


static int __init s3cmci_init(void)
static int __init s3cmci_init(void)