spi/s3c64xx: Remove redundant runtime PM management
authorMark Brown <broonie@kernel.org>
Fri, 5 Dec 2014 20:23:06 +0000 (20:23 +0000)
committerMark Brown <broonie@kernel.org>
Sun, 7 Dec 2014 13:47:21 +0000 (13:47 +0000)
The device already asks the core to hold a runtime PM reference while it
is active so it is redundant to open code that in the driver itself.

Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-s3c64xx.c

index 59e07cf315984ec6e07014bd36f28b9e3e17eaa3..0f602cba19896c8c5b5bf4f48c0880d0f3196b46 100644 (file)
@@ -346,16 +346,8 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
                spi->dma_tx = sdd->tx_dma.ch;
        }
 
-       ret = pm_runtime_get_sync(&sdd->pdev->dev);
-       if (ret < 0) {
-               dev_err(dev, "Failed to enable device: %d\n", ret);
-               goto out_tx;
-       }
-
        return 0;
 
-out_tx:
-       dma_release_channel(sdd->tx_dma.ch);
 out_rx:
        dma_release_channel(sdd->rx_dma.ch);
 out:
@@ -372,7 +364,6 @@ static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi)
                dma_release_channel(sdd->tx_dma.ch);
        }
 
-       pm_runtime_put(&sdd->pdev->dev);
        return 0;
 }