diff options
author | Ben Dooks <ben@simtec.co.uk> | 2009-09-22 19:46:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:44 -0400 |
commit | 6d61320707ac2960bc820616bd5921885b874780 (patch) | |
tree | 3fac8d598b74cde16dec46311beb847d6febcf7f /drivers/spi | |
parent | b5e3afb5e32c9acf69fcc17961c3fddc47e9cc06 (diff) |
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi_s3c24xx.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 705841fb4ca0..03695b67ebd5 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
@@ -418,9 +418,9 @@ static int __exit s3c24xx_spi_remove(struct platform_device *dev) | |||
418 | 418 | ||
419 | #ifdef CONFIG_PM | 419 | #ifdef CONFIG_PM |
420 | 420 | ||
421 | static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) | 421 | static int s3c24xx_spi_suspend(struct device *dev) |
422 | { | 422 | { |
423 | struct s3c24xx_spi *hw = platform_get_drvdata(pdev); | 423 | struct s3c24xx_spi *hw = platform_get_drvdata(to_platform_device(dev)); |
424 | 424 | ||
425 | if (hw->pdata && hw->pdata->gpio_setup) | 425 | if (hw->pdata && hw->pdata->gpio_setup) |
426 | hw->pdata->gpio_setup(hw->pdata, 0); | 426 | hw->pdata->gpio_setup(hw->pdata, 0); |
@@ -429,27 +429,31 @@ static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) | |||
429 | return 0; | 429 | return 0; |
430 | } | 430 | } |
431 | 431 | ||
432 | static int s3c24xx_spi_resume(struct platform_device *pdev) | 432 | static int s3c24xx_spi_resume(struct device *dev) |
433 | { | 433 | { |
434 | struct s3c24xx_spi *hw = platform_get_drvdata(pdev); | 434 | struct s3c24xx_spi *hw = platform_get_drvdata(to_platform_device(dev)); |
435 | 435 | ||
436 | s3c24xx_spi_initialsetup(hw); | 436 | s3c24xx_spi_initialsetup(hw); |
437 | return 0; | 437 | return 0; |
438 | } | 438 | } |
439 | 439 | ||
440 | static struct dev_pm_ops s3c24xx_spi_pmops = { | ||
441 | .suspend = s3c24xx_spi_suspend, | ||
442 | .resume = s3c24xx_spi_resume, | ||
443 | }; | ||
444 | |||
445 | #define S3C24XX_SPI_PMOPS &s3c24xx_spi_pmops | ||
440 | #else | 446 | #else |
441 | #define s3c24xx_spi_suspend NULL | 447 | #define S3C24XX_SPI_PMOPS NULL |
442 | #define s3c24xx_spi_resume NULL | 448 | #endif /* CONFIG_PM */ |
443 | #endif | ||
444 | 449 | ||
445 | MODULE_ALIAS("platform:s3c2410-spi"); | 450 | MODULE_ALIAS("platform:s3c2410-spi"); |
446 | static struct platform_driver s3c24xx_spi_driver = { | 451 | static struct platform_driver s3c24xx_spi_driver = { |
447 | .remove = __exit_p(s3c24xx_spi_remove), | 452 | .remove = __exit_p(s3c24xx_spi_remove), |
448 | .suspend = s3c24xx_spi_suspend, | ||
449 | .resume = s3c24xx_spi_resume, | ||
450 | .driver = { | 453 | .driver = { |
451 | .name = "s3c2410-spi", | 454 | .name = "s3c2410-spi", |
452 | .owner = THIS_MODULE, | 455 | .owner = THIS_MODULE, |
456 | .pm = S3C24XX_SPI_PMOPS, | ||
453 | }, | 457 | }, |
454 | }; | 458 | }; |
455 | 459 | ||