spi/s3c64xx: Take runtime PM reference even if DMA is not supported

We always need the device to be runtime PM enabled to use it so just skip
the DMA initialisation not the entire prepare when polling.

Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Mark Brown 2013-08-13 19:03:01 +01:00
parent 3c729b4344
commit c12f964357

View File

@ -429,9 +429,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
dma_cap_mask_t mask;
int ret;
if (is_polling(sdd))
return 0;
if (!is_polling(sdd)) {
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
@ -451,6 +449,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
ret = -EBUSY;
goto out_rx;
}
}
ret = pm_runtime_get_sync(&sdd->pdev->dev);
if (ret < 0) {