diff options
author | Wenyou Yang <wenyou.yang@atmel.com> | 2014-03-05 07:29:01 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-05 07:59:53 +0400 |
commit | ba938f3a295686aa9ab5077b10d1049f8091cbd7 (patch) | |
tree | 27c24f28ad0f62820cd69b329bd1a78fbc06bdd0 /drivers/spi | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) | |
download | linux-ba938f3a295686aa9ab5077b10d1049f8091cbd7.tar.xz |
spi: atmel: add missing spi_master_{resume,suspend} calls to PM callbacks
The PM callbacks implemented by the spi-atmel driver don't call
spi_master_{resume,suspend}, fix that.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-atmel.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index b0842f751016..5d7b07f08326 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1455,6 +1455,14 @@ static int atmel_spi_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct atmel_spi *as = spi_master_get_devdata(master); + int ret; + + /* Stop the queue running */ + ret = spi_master_suspend(master); + if (ret) { + dev_warn(dev, "cannot suspend master\n"); + return ret; + } clk_disable_unprepare(as->clk); return 0; @@ -1464,9 +1472,16 @@ static int atmel_spi_resume(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct atmel_spi *as = spi_master_get_devdata(master); + int ret; clk_prepare_enable(as->clk); - return 0; + + /* Start the queue running */ + ret = spi_master_resume(master); + if (ret) + dev_err(dev, "problem starting queue (%d)\n", ret); + + return ret; } static SIMPLE_DEV_PM_OPS(atmel_spi_pm_ops, atmel_spi_suspend, atmel_spi_resume); |