Skip to content

Commit

Permalink
spi/s3c64xx: Remove redundant runtime PM management
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Dec 7, 2014
1 parent bf77cba commit bc88f11
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/spi/spi-s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
}

Expand Down

0 comments on commit bc88f11

Please sign in to comment.