diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-03-05 15:19:09 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-13 09:57:29 +0000 |
commit | a82ba3a318dd5eaf1f3dcbc335f81770d557a4fc (patch) | |
tree | 759360c4adfdf5afa64446969d6942fb1f1e2b20 /drivers/spi | |
parent | eeb7139524d1851c29b5c02b3dcd6679299a104e (diff) |
spi: sirf: Add missing spi_master_{resume,suspend} calls to PM callbacks
This is required since commit 2025172e3280 "spi/bitbang: Use core message pump".
spi-bitbang now uses core message pump, so it needs to call spi_master_suspend/
spi_master_resume to stop/start the queue while suspend/resume.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-sirf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index a72b8f87a15..1a77ad52812 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c @@ -748,6 +748,11 @@ static int spi_sirfsoc_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct sirfsoc_spi *sspi = spi_master_get_devdata(master); + int ret; + + ret = spi_master_suspend(master); + if (ret) + return ret; clk_disable(sspi->clk); return 0; @@ -764,7 +769,7 @@ static int spi_sirfsoc_resume(struct device *dev) writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_RXFIFO_OP); writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP); - return 0; + return spi_master_resume(master); } #endif |