summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bfin-sport.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-25 09:51:21 +0100
committerMark Brown <broonie@linaro.org>2013-10-25 09:51:21 +0100
commit52d85ebb7b639448e596a8577bf981f5b139f4fd (patch)
tree7632999ecf194b9863ad4a86533a91b9f78a28ce /drivers/spi/spi-bfin-sport.c
parent2ef2e60d2f4d470b0cb591baeaf942316c0673ed (diff)
parentdb9371b853e7cebce93f0775215ef297b8d0bf93 (diff)
downloadlinux-stable-52d85ebb7b639448e596a8577bf981f5b139f4fd.tar.gz
linux-stable-52d85ebb7b639448e596a8577bf981f5b139f4fd.tar.bz2
linux-stable-52d85ebb7b639448e596a8577bf981f5b139f4fd.zip
Merge remote-tracking branch 'spi/topic/bfin' into spi-next
Diffstat (limited to 'drivers/spi/spi-bfin-sport.c')
-rw-r--r--drivers/spi/spi-bfin-sport.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/spi/spi-bfin-sport.c b/drivers/spi/spi-bfin-sport.c
index 7b2cda0747d5..38941e5920b5 100644
--- a/drivers/spi/spi-bfin-sport.c
+++ b/drivers/spi/spi-bfin-sport.c
@@ -879,11 +879,10 @@ static int bfin_sport_spi_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
-static int
-bfin_sport_spi_suspend(struct platform_device *pdev, pm_message_t state)
+#ifdef CONFIG_PM_SLEEP
+static int bfin_sport_spi_suspend(struct device *dev)
{
- struct bfin_sport_spi_master_data *drv_data = platform_get_drvdata(pdev);
+ struct bfin_sport_spi_master_data *drv_data = dev_get_drvdata(dev);
int status;
status = bfin_sport_spi_stop_queue(drv_data);
@@ -896,10 +895,9 @@ bfin_sport_spi_suspend(struct platform_device *pdev, pm_message_t state)
return status;
}
-static int
-bfin_sport_spi_resume(struct platform_device *pdev)
+static int bfin_sport_spi_resume(struct device *dev)
{
- struct bfin_sport_spi_master_data *drv_data = platform_get_drvdata(pdev);
+ struct bfin_sport_spi_master_data *drv_data = dev_get_drvdata(dev);
int status;
/* Enable the SPI interface */
@@ -912,19 +910,22 @@ bfin_sport_spi_resume(struct platform_device *pdev)
return status;
}
+
+static SIMPLE_DEV_PM_OPS(bfin_sport_spi_pm_ops, bfin_sport_spi_suspend,
+ bfin_sport_spi_resume);
+
+#define BFIN_SPORT_SPI_PM_OPS (&bfin_sport_spi_pm_ops)
#else
-# define bfin_sport_spi_suspend NULL
-# define bfin_sport_spi_resume NULL
+#define BFIN_SPORT_SPI_PM_OPS NULL
#endif
static struct platform_driver bfin_sport_spi_driver = {
.driver = {
- .name = DRV_NAME,
- .owner = THIS_MODULE,
+ .name = DRV_NAME,
+ .owner = THIS_MODULE,
+ .pm = BFIN_SPORT_SPI_PM_OPS,
},
.probe = bfin_sport_spi_probe,
.remove = bfin_sport_spi_remove,
- .suspend = bfin_sport_spi_suspend,
- .resume = bfin_sport_spi_resume,
};
module_platform_driver(bfin_sport_spi_driver);