mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
spi/s3c64xx: Convert to dev_pm_ops
In preparation for the addition of runtime PM ops. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
c2573128ad
commit
e25d0bf917
1 changed files with 10 additions and 9 deletions
|
@ -1231,9 +1231,9 @@ static int s3c64xx_spi_remove(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int s3c64xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
|
||||
static int s3c64xx_spi_suspend(struct device *dev)
|
||||
{
|
||||
struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
|
||||
struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
|
||||
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -1253,9 +1253,10 @@ static int s3c64xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int s3c64xx_spi_resume(struct platform_device *pdev)
|
||||
static int s3c64xx_spi_resume(struct device *dev)
|
||||
{
|
||||
struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
|
||||
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
|
||||
struct s3c64xx_spi_info *sci = sdd->cntrlr_info;
|
||||
unsigned long flags;
|
||||
|
@ -1274,19 +1275,19 @@ static int s3c64xx_spi_resume(struct platform_device *pdev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#define s3c64xx_spi_suspend NULL
|
||||
#define s3c64xx_spi_resume NULL
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static const struct dev_pm_ops s3c64xx_spi_pm = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(s3c64xx_spi_suspend, s3c64xx_spi_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver s3c64xx_spi_driver = {
|
||||
.driver = {
|
||||
.name = "s3c64xx-spi",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &s3c64xx_spi_pm,
|
||||
},
|
||||
.remove = s3c64xx_spi_remove,
|
||||
.suspend = s3c64xx_spi_suspend,
|
||||
.resume = s3c64xx_spi_resume,
|
||||
};
|
||||
MODULE_ALIAS("platform:s3c64xx-spi");
|
||||
|
||||
|
|
Loading…
Reference in a new issue