diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-28 10:35:21 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-29 13:00:21 -0400 |
commit | 7dd62787334ac6e0e2a0ef3f20bb1936ac431b04 (patch) | |
tree | 57e0579e7090df9a7d04acecfea1156391fdf84b | |
parent | 29b6e906a70a47c9cdd7406a8c20ef5098f0b4e8 (diff) |
spi/pxa2xx: Convert to core runtime PM
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index f440dcee852b..a8c85424eb8d 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c | |||
@@ -804,14 +804,6 @@ static int pxa2xx_spi_transfer_one_message(struct spi_master *master, | |||
804 | return 0; | 804 | return 0; |
805 | } | 805 | } |
806 | 806 | ||
807 | static int pxa2xx_spi_prepare_transfer(struct spi_master *master) | ||
808 | { | ||
809 | struct driver_data *drv_data = spi_master_get_devdata(master); | ||
810 | |||
811 | pm_runtime_get_sync(&drv_data->pdev->dev); | ||
812 | return 0; | ||
813 | } | ||
814 | |||
815 | static int pxa2xx_spi_unprepare_transfer(struct spi_master *master) | 807 | static int pxa2xx_spi_unprepare_transfer(struct spi_master *master) |
816 | { | 808 | { |
817 | struct driver_data *drv_data = spi_master_get_devdata(master); | 809 | struct driver_data *drv_data = spi_master_get_devdata(master); |
@@ -820,8 +812,6 @@ static int pxa2xx_spi_unprepare_transfer(struct spi_master *master) | |||
820 | write_SSCR0(read_SSCR0(drv_data->ioaddr) & ~SSCR0_SSE, | 812 | write_SSCR0(read_SSCR0(drv_data->ioaddr) & ~SSCR0_SSE, |
821 | drv_data->ioaddr); | 813 | drv_data->ioaddr); |
822 | 814 | ||
823 | pm_runtime_mark_last_busy(&drv_data->pdev->dev); | ||
824 | pm_runtime_put_autosuspend(&drv_data->pdev->dev); | ||
825 | return 0; | 815 | return 0; |
826 | } | 816 | } |
827 | 817 | ||
@@ -1134,8 +1124,8 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) | |||
1134 | master->cleanup = cleanup; | 1124 | master->cleanup = cleanup; |
1135 | master->setup = setup; | 1125 | master->setup = setup; |
1136 | master->transfer_one_message = pxa2xx_spi_transfer_one_message; | 1126 | master->transfer_one_message = pxa2xx_spi_transfer_one_message; |
1137 | master->prepare_transfer_hardware = pxa2xx_spi_prepare_transfer; | ||
1138 | master->unprepare_transfer_hardware = pxa2xx_spi_unprepare_transfer; | 1127 | master->unprepare_transfer_hardware = pxa2xx_spi_unprepare_transfer; |
1128 | master->auto_runtime_pm = true; | ||
1139 | 1129 | ||
1140 | drv_data->ssp_type = ssp->type; | 1130 | drv_data->ssp_type = ssp->type; |
1141 | drv_data->null_dma_buf = (u32 *)PTR_ALIGN(&drv_data[1], DMA_ALIGNMENT); | 1131 | drv_data->null_dma_buf = (u32 *)PTR_ALIGN(&drv_data[1], DMA_ALIGNMENT); |