spi_s3c24xx: use dev_pm_ops
Change the spi_s3c24xx driver to use dev_pm_ops to avoid the following warning during probe: Platform driver 's3c2410-spi' needs updating - please use dev_pm_ops Signed-off-by: Ben Dooks <ben@simtec.co.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
b5e3afb5e3
commit
6d61320707
@@ -418,9 +418,9 @@ static int __exit s3c24xx_spi_remove(struct platform_device *dev)
|
|||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
|
||||||
static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg)
|
static int s3c24xx_spi_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct s3c24xx_spi *hw = platform_get_drvdata(pdev);
|
struct s3c24xx_spi *hw = platform_get_drvdata(to_platform_device(dev));
|
||||||
|
|
||||||
if (hw->pdata && hw->pdata->gpio_setup)
|
if (hw->pdata && hw->pdata->gpio_setup)
|
||||||
hw->pdata->gpio_setup(hw->pdata, 0);
|
hw->pdata->gpio_setup(hw->pdata, 0);
|
||||||
@@ -429,27 +429,31 @@ static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int s3c24xx_spi_resume(struct platform_device *pdev)
|
static int s3c24xx_spi_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct s3c24xx_spi *hw = platform_get_drvdata(pdev);
|
struct s3c24xx_spi *hw = platform_get_drvdata(to_platform_device(dev));
|
||||||
|
|
||||||
s3c24xx_spi_initialsetup(hw);
|
s3c24xx_spi_initialsetup(hw);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct dev_pm_ops s3c24xx_spi_pmops = {
|
||||||
|
.suspend = s3c24xx_spi_suspend,
|
||||||
|
.resume = s3c24xx_spi_resume,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define S3C24XX_SPI_PMOPS &s3c24xx_spi_pmops
|
||||||
#else
|
#else
|
||||||
#define s3c24xx_spi_suspend NULL
|
#define S3C24XX_SPI_PMOPS NULL
|
||||||
#define s3c24xx_spi_resume NULL
|
#endif /* CONFIG_PM */
|
||||||
#endif
|
|
||||||
|
|
||||||
MODULE_ALIAS("platform:s3c2410-spi");
|
MODULE_ALIAS("platform:s3c2410-spi");
|
||||||
static struct platform_driver s3c24xx_spi_driver = {
|
static struct platform_driver s3c24xx_spi_driver = {
|
||||||
.remove = __exit_p(s3c24xx_spi_remove),
|
.remove = __exit_p(s3c24xx_spi_remove),
|
||||||
.suspend = s3c24xx_spi_suspend,
|
|
||||||
.resume = s3c24xx_spi_resume,
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "s3c2410-spi",
|
.name = "s3c2410-spi",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
.pm = S3C24XX_SPI_PMOPS,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user