diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-12-17 15:42:10 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-17 17:40:19 -0500 |
commit | 1bae20285b6f8a692676a4489309bcad581c3f68 (patch) | |
tree | 19269f13f81191f05a638c04e39e5215e421ab17 /drivers/spi/spi-bcm63xx.c | |
parent | ea01e8a4cdff627cbc417d1bf945bf34df9afa9d (diff) |
spi/bcm63xx: fix pm sleep support
Use the correct symbol to guard the callbacks and use appropriate defines
for setting up the ops struct.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-bcm63xx.c')
-rw-r--r-- | drivers/spi/spi-bcm63xx.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index db6a47d7b48c..b440b0fef77b 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c | |||
@@ -438,7 +438,7 @@ static int bcm63xx_spi_remove(struct platform_device *pdev) | |||
438 | return 0; | 438 | return 0; |
439 | } | 439 | } |
440 | 440 | ||
441 | #ifdef CONFIG_PM | 441 | #ifdef CONFIG_PM_SLEEP |
442 | static int bcm63xx_spi_suspend(struct device *dev) | 442 | static int bcm63xx_spi_suspend(struct device *dev) |
443 | { | 443 | { |
444 | struct spi_master *master = dev_get_drvdata(dev); | 444 | struct spi_master *master = dev_get_drvdata(dev); |
@@ -465,22 +465,17 @@ static int bcm63xx_spi_resume(struct device *dev) | |||
465 | 465 | ||
466 | return 0; | 466 | return 0; |
467 | } | 467 | } |
468 | #endif | ||
468 | 469 | ||
469 | static const struct dev_pm_ops bcm63xx_spi_pm_ops = { | 470 | static const struct dev_pm_ops bcm63xx_spi_pm_ops = { |
470 | .suspend = bcm63xx_spi_suspend, | 471 | SET_SYSTEM_SLEEP_PM_OPS(bcm63xx_spi_suspend, bcm63xx_spi_resume) |
471 | .resume = bcm63xx_spi_resume, | ||
472 | }; | 472 | }; |
473 | 473 | ||
474 | #define BCM63XX_SPI_PM_OPS (&bcm63xx_spi_pm_ops) | ||
475 | #else | ||
476 | #define BCM63XX_SPI_PM_OPS NULL | ||
477 | #endif | ||
478 | |||
479 | static struct platform_driver bcm63xx_spi_driver = { | 474 | static struct platform_driver bcm63xx_spi_driver = { |
480 | .driver = { | 475 | .driver = { |
481 | .name = "bcm63xx-spi", | 476 | .name = "bcm63xx-spi", |
482 | .owner = THIS_MODULE, | 477 | .owner = THIS_MODULE, |
483 | .pm = BCM63XX_SPI_PM_OPS, | 478 | .pm = &bcm63xx_spi_pm_ops, |
484 | }, | 479 | }, |
485 | .probe = bcm63xx_spi_probe, | 480 | .probe = bcm63xx_spi_probe, |
486 | .remove = bcm63xx_spi_remove, | 481 | .remove = bcm63xx_spi_remove, |