diff options
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index d8a105f76837..9e9e0f971e6c 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c | |||
@@ -1274,7 +1274,9 @@ static int pxa2xx_spi_suspend(struct device *dev) | |||
1274 | if (status != 0) | 1274 | if (status != 0) |
1275 | return status; | 1275 | return status; |
1276 | write_SSCR0(0, drv_data->ioaddr); | 1276 | write_SSCR0(0, drv_data->ioaddr); |
1277 | clk_disable_unprepare(ssp->clk); | 1277 | |
1278 | if (!pm_runtime_suspended(dev)) | ||
1279 | clk_disable_unprepare(ssp->clk); | ||
1278 | 1280 | ||
1279 | return 0; | 1281 | return 0; |
1280 | } | 1282 | } |
@@ -1288,7 +1290,8 @@ static int pxa2xx_spi_resume(struct device *dev) | |||
1288 | pxa2xx_spi_dma_resume(drv_data); | 1290 | pxa2xx_spi_dma_resume(drv_data); |
1289 | 1291 | ||
1290 | /* Enable the SSP clock */ | 1292 | /* Enable the SSP clock */ |
1291 | clk_prepare_enable(ssp->clk); | 1293 | if (!pm_runtime_suspended(dev)) |
1294 | clk_prepare_enable(ssp->clk); | ||
1292 | 1295 | ||
1293 | /* Restore LPSS private register bits */ | 1296 | /* Restore LPSS private register bits */ |
1294 | lpss_ssp_setup(drv_data); | 1297 | lpss_ssp_setup(drv_data); |