Skip to content

Commit 2fca750

Browse files
Sakari Ailusbroonie
authored andcommitted
spi: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy(). Signed-off-by: Sakari Ailus <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent cd4da71 commit 2fca750

18 files changed

+0
-49
lines changed

drivers/spi/atmel-quadspi.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,6 @@ static int atmel_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
965965
err = aq->ops->transfer(mem, op, offset);
966966

967967
pm_runtime_put:
968-
pm_runtime_mark_last_busy(&aq->pdev->dev);
969968
pm_runtime_put_autosuspend(&aq->pdev->dev);
970969
return err;
971970
}
@@ -1168,7 +1167,6 @@ static int atmel_qspi_setup(struct spi_device *spi)
11681167
aq->scr |= QSPI_SCR_SCBR(scbr);
11691168
atmel_qspi_write(aq->scr, aq, QSPI_SCR);
11701169

1171-
pm_runtime_mark_last_busy(ctrl->dev.parent);
11721170
pm_runtime_put_autosuspend(ctrl->dev.parent);
11731171

11741172
return 0;
@@ -1230,7 +1228,6 @@ static int atmel_qspi_set_cs_timing(struct spi_device *spi)
12301228
aq->mr |= QSPI_MR_DLYBCT(cs_hold) | QSPI_MR_DLYCS(cs_inactive);
12311229
atmel_qspi_write(aq->mr, aq, QSPI_MR);
12321230

1233-
pm_runtime_mark_last_busy(ctrl->dev.parent);
12341231
pm_runtime_put_autosuspend(ctrl->dev.parent);
12351232

12361233
return 0;
@@ -1448,7 +1445,6 @@ static int atmel_qspi_probe(struct platform_device *pdev)
14481445
if (err)
14491446
goto dma_release;
14501447

1451-
pm_runtime_mark_last_busy(&pdev->dev);
14521448
pm_runtime_put_autosuspend(&pdev->dev);
14531449

14541450
return 0;
@@ -1582,7 +1578,6 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
15821578

15831579
atmel_qspi_write(aq->scr, aq, QSPI_SCR);
15841580

1585-
pm_runtime_mark_last_busy(dev);
15861581
pm_runtime_put_autosuspend(dev);
15871582

15881583
return 0;

drivers/spi/spi-cadence-quadspi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,6 @@ static int cqspi_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op *op)
14691469

14701470
ret = cqspi_mem_process(mem, op);
14711471

1472-
pm_runtime_mark_last_busy(dev);
14731472
pm_runtime_put_autosuspend(dev);
14741473

14751474
if (ret)
@@ -1975,7 +1974,6 @@ static int cqspi_probe(struct platform_device *pdev)
19751974
goto probe_setup_failed;
19761975
}
19771976

1978-
pm_runtime_mark_last_busy(dev);
19791977
pm_runtime_put_autosuspend(dev);
19801978

19811979
return 0;

drivers/spi/spi-cadence.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,6 @@ static int cdns_spi_probe(struct platform_device *pdev)
662662
/* Set to default valid value */
663663
ctlr->max_speed_hz = xspi->clk_rate / 4;
664664
xspi->speed_hz = ctlr->max_speed_hz;
665-
pm_runtime_mark_last_busy(&pdev->dev);
666665
pm_runtime_put_autosuspend(&pdev->dev);
667666
} else {
668667
ctlr->mode_bits |= SPI_NO_CS;

drivers/spi/spi-fsl-espi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ static int fsl_espi_setup(struct spi_device *spi)
513513

514514
fsl_espi_setup_transfer(spi, NULL);
515515

516-
pm_runtime_mark_last_busy(espi->dev);
517516
pm_runtime_put_autosuspend(espi->dev);
518517

519518
return 0;
@@ -726,7 +725,6 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
726725

727726
dev_info(dev, "irq = %u\n", irq);
728727

729-
pm_runtime_mark_last_busy(dev);
730728
pm_runtime_put_autosuspend(dev);
731729

732730
return 0;

drivers/spi/spi-fsl-lpspi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ static int lpspi_unprepare_xfer_hardware(struct spi_controller *controller)
233233
struct fsl_lpspi_data *fsl_lpspi =
234234
spi_controller_get_devdata(controller);
235235

236-
pm_runtime_mark_last_busy(fsl_lpspi->dev);
237236
pm_runtime_put_autosuspend(fsl_lpspi->dev);
238237

239238
return 0;
@@ -966,7 +965,6 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
966965
goto free_dma;
967966
}
968967

969-
pm_runtime_mark_last_busy(fsl_lpspi->dev);
970968
pm_runtime_put_autosuspend(fsl_lpspi->dev);
971969

972970
return 0;

drivers/spi/spi-imx.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,6 @@ spi_imx_prepare_message(struct spi_controller *controller, struct spi_message *m
17481748

17491749
ret = spi_imx->devtype_data->prepare_message(spi_imx, msg);
17501750
if (ret) {
1751-
pm_runtime_mark_last_busy(spi_imx->dev);
17521751
pm_runtime_put_autosuspend(spi_imx->dev);
17531752
}
17541753

@@ -1760,7 +1759,6 @@ spi_imx_unprepare_message(struct spi_controller *controller, struct spi_message
17601759
{
17611760
struct spi_imx_data *spi_imx = spi_controller_get_devdata(controller);
17621761

1763-
pm_runtime_mark_last_busy(spi_imx->dev);
17641762
pm_runtime_put_autosuspend(spi_imx->dev);
17651763
return 0;
17661764
}
@@ -1933,7 +1931,6 @@ static int spi_imx_probe(struct platform_device *pdev)
19331931
goto out_register_controller;
19341932
}
19351933

1936-
pm_runtime_mark_last_busy(spi_imx->dev);
19371934
pm_runtime_put_autosuspend(spi_imx->dev);
19381935

19391936
return ret;

drivers/spi/spi-mtk-nor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,6 @@ static int mtk_nor_probe(struct platform_device *pdev)
918918
if (ret < 0)
919919
goto err_probe;
920920

921-
pm_runtime_mark_last_busy(&pdev->dev);
922921
pm_runtime_put_autosuspend(&pdev->dev);
923922

924923
dev_info(&pdev->dev, "spi frequency: %d Hz\n", sp->spi_freq);

drivers/spi/spi-nxp-fspi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,6 @@ static int nxp_fspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
968968
/* Invalidate the data in the AHB buffer. */
969969
nxp_fspi_invalid(f);
970970

971-
pm_runtime_mark_last_busy(f->dev);
972971
pm_runtime_put_autosuspend(f->dev);
973972

974973
return err;

drivers/spi/spi-omap2-mcspi.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
272272

273273
mcspi_write_chconf0(spi, l);
274274

275-
pm_runtime_mark_last_busy(mcspi->dev);
276275
pm_runtime_put_autosuspend(mcspi->dev);
277276
}
278277
}
@@ -1102,7 +1101,6 @@ static int omap2_mcspi_setup(struct spi_device *spi)
11021101
if (ret && initial_setup)
11031102
omap2_mcspi_cleanup(spi);
11041103

1105-
pm_runtime_mark_last_busy(mcspi->dev);
11061104
pm_runtime_put_autosuspend(mcspi->dev);
11071105

11081106
return ret;
@@ -1379,7 +1377,6 @@ static int omap2_mcspi_controller_setup(struct omap2_mcspi *mcspi)
13791377
ctx->wakeupenable = OMAP2_MCSPI_WAKEUPENABLE_WKEN;
13801378

13811379
omap2_mcspi_set_mode(ctlr);
1382-
pm_runtime_mark_last_busy(mcspi->dev);
13831380
pm_runtime_put_autosuspend(mcspi->dev);
13841381
return 0;
13851382
}

drivers/spi/spi-rockchip-sfc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,6 @@ static int rockchip_sfc_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op
565565

566566
ret = rockchip_sfc_xfer_done(sfc, 100000);
567567
out:
568-
pm_runtime_mark_last_busy(sfc->dev);
569568
pm_runtime_put_autosuspend(sfc->dev);
570569

571570
return ret;
@@ -712,7 +711,6 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
712711
if (ret)
713712
goto err_register;
714713

715-
pm_runtime_mark_last_busy(dev);
716714
pm_runtime_put_autosuspend(dev);
717715

718716
return 0;
@@ -799,7 +797,6 @@ static int rockchip_sfc_resume(struct device *dev)
799797

800798
rockchip_sfc_init(sfc);
801799

802-
pm_runtime_mark_last_busy(dev);
803800
pm_runtime_put_autosuspend(dev);
804801

805802
return 0;

0 commit comments

Comments
 (0)