mirror of https://github.com/torvalds/linux.git
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 <sakari.ailus@linux.intel.com> Link: https://patch.msgid.link/20250704075447.3221784-1-sakari.ailus@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
cd4da713f9
commit
2fca750160
|
|
@ -965,7 +965,6 @@ static int atmel_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
|
|||
err = aq->ops->transfer(mem, op, offset);
|
||||
|
||||
pm_runtime_put:
|
||||
pm_runtime_mark_last_busy(&aq->pdev->dev);
|
||||
pm_runtime_put_autosuspend(&aq->pdev->dev);
|
||||
return err;
|
||||
}
|
||||
|
|
@ -1168,7 +1167,6 @@ static int atmel_qspi_setup(struct spi_device *spi)
|
|||
aq->scr |= QSPI_SCR_SCBR(scbr);
|
||||
atmel_qspi_write(aq->scr, aq, QSPI_SCR);
|
||||
|
||||
pm_runtime_mark_last_busy(ctrl->dev.parent);
|
||||
pm_runtime_put_autosuspend(ctrl->dev.parent);
|
||||
|
||||
return 0;
|
||||
|
|
@ -1230,7 +1228,6 @@ static int atmel_qspi_set_cs_timing(struct spi_device *spi)
|
|||
aq->mr |= QSPI_MR_DLYBCT(cs_hold) | QSPI_MR_DLYCS(cs_inactive);
|
||||
atmel_qspi_write(aq->mr, aq, QSPI_MR);
|
||||
|
||||
pm_runtime_mark_last_busy(ctrl->dev.parent);
|
||||
pm_runtime_put_autosuspend(ctrl->dev.parent);
|
||||
|
||||
return 0;
|
||||
|
|
@ -1448,7 +1445,6 @@ static int atmel_qspi_probe(struct platform_device *pdev)
|
|||
if (err)
|
||||
goto dma_release;
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
|
@ -1582,7 +1578,6 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
|
|||
|
||||
atmel_qspi_write(aq->scr, aq, QSPI_SCR);
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1469,7 +1469,6 @@ static int cqspi_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op *op)
|
|||
|
||||
ret = cqspi_mem_process(mem, op);
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
if (ret)
|
||||
|
|
@ -1975,7 +1974,6 @@ static int cqspi_probe(struct platform_device *pdev)
|
|||
goto probe_setup_failed;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -662,7 +662,6 @@ static int cdns_spi_probe(struct platform_device *pdev)
|
|||
/* Set to default valid value */
|
||||
ctlr->max_speed_hz = xspi->clk_rate / 4;
|
||||
xspi->speed_hz = ctlr->max_speed_hz;
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
} else {
|
||||
ctlr->mode_bits |= SPI_NO_CS;
|
||||
|
|
|
|||
|
|
@ -513,7 +513,6 @@ static int fsl_espi_setup(struct spi_device *spi)
|
|||
|
||||
fsl_espi_setup_transfer(spi, NULL);
|
||||
|
||||
pm_runtime_mark_last_busy(espi->dev);
|
||||
pm_runtime_put_autosuspend(espi->dev);
|
||||
|
||||
return 0;
|
||||
|
|
@ -726,7 +725,6 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
|
|||
|
||||
dev_info(dev, "irq = %u\n", irq);
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -233,7 +233,6 @@ static int lpspi_unprepare_xfer_hardware(struct spi_controller *controller)
|
|||
struct fsl_lpspi_data *fsl_lpspi =
|
||||
spi_controller_get_devdata(controller);
|
||||
|
||||
pm_runtime_mark_last_busy(fsl_lpspi->dev);
|
||||
pm_runtime_put_autosuspend(fsl_lpspi->dev);
|
||||
|
||||
return 0;
|
||||
|
|
@ -966,7 +965,6 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
|
|||
goto free_dma;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(fsl_lpspi->dev);
|
||||
pm_runtime_put_autosuspend(fsl_lpspi->dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1748,7 +1748,6 @@ spi_imx_prepare_message(struct spi_controller *controller, struct spi_message *m
|
|||
|
||||
ret = spi_imx->devtype_data->prepare_message(spi_imx, msg);
|
||||
if (ret) {
|
||||
pm_runtime_mark_last_busy(spi_imx->dev);
|
||||
pm_runtime_put_autosuspend(spi_imx->dev);
|
||||
}
|
||||
|
||||
|
|
@ -1760,7 +1759,6 @@ spi_imx_unprepare_message(struct spi_controller *controller, struct spi_message
|
|||
{
|
||||
struct spi_imx_data *spi_imx = spi_controller_get_devdata(controller);
|
||||
|
||||
pm_runtime_mark_last_busy(spi_imx->dev);
|
||||
pm_runtime_put_autosuspend(spi_imx->dev);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1933,7 +1931,6 @@ static int spi_imx_probe(struct platform_device *pdev)
|
|||
goto out_register_controller;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(spi_imx->dev);
|
||||
pm_runtime_put_autosuspend(spi_imx->dev);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -918,7 +918,6 @@ static int mtk_nor_probe(struct platform_device *pdev)
|
|||
if (ret < 0)
|
||||
goto err_probe;
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
dev_info(&pdev->dev, "spi frequency: %d Hz\n", sp->spi_freq);
|
||||
|
|
|
|||
|
|
@ -968,7 +968,6 @@ static int nxp_fspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
|
|||
/* Invalidate the data in the AHB buffer. */
|
||||
nxp_fspi_invalid(f);
|
||||
|
||||
pm_runtime_mark_last_busy(f->dev);
|
||||
pm_runtime_put_autosuspend(f->dev);
|
||||
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -272,7 +272,6 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
|
|||
|
||||
mcspi_write_chconf0(spi, l);
|
||||
|
||||
pm_runtime_mark_last_busy(mcspi->dev);
|
||||
pm_runtime_put_autosuspend(mcspi->dev);
|
||||
}
|
||||
}
|
||||
|
|
@ -1102,7 +1101,6 @@ static int omap2_mcspi_setup(struct spi_device *spi)
|
|||
if (ret && initial_setup)
|
||||
omap2_mcspi_cleanup(spi);
|
||||
|
||||
pm_runtime_mark_last_busy(mcspi->dev);
|
||||
pm_runtime_put_autosuspend(mcspi->dev);
|
||||
|
||||
return ret;
|
||||
|
|
@ -1379,7 +1377,6 @@ static int omap2_mcspi_controller_setup(struct omap2_mcspi *mcspi)
|
|||
ctx->wakeupenable = OMAP2_MCSPI_WAKEUPENABLE_WKEN;
|
||||
|
||||
omap2_mcspi_set_mode(ctlr);
|
||||
pm_runtime_mark_last_busy(mcspi->dev);
|
||||
pm_runtime_put_autosuspend(mcspi->dev);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -565,7 +565,6 @@ static int rockchip_sfc_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op
|
|||
|
||||
ret = rockchip_sfc_xfer_done(sfc, 100000);
|
||||
out:
|
||||
pm_runtime_mark_last_busy(sfc->dev);
|
||||
pm_runtime_put_autosuspend(sfc->dev);
|
||||
|
||||
return ret;
|
||||
|
|
@ -712,7 +711,6 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto err_register;
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return 0;
|
||||
|
|
@ -799,7 +797,6 @@ static int rockchip_sfc_resume(struct device *dev)
|
|||
|
||||
rockchip_sfc_init(sfc);
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1045,14 +1045,12 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
|
|||
}
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(&sdd->pdev->dev);
|
||||
pm_runtime_put_autosuspend(&sdd->pdev->dev);
|
||||
s3c64xx_spi_set_cs(spi, false);
|
||||
|
||||
return 0;
|
||||
|
||||
setup_exit:
|
||||
pm_runtime_mark_last_busy(&sdd->pdev->dev);
|
||||
pm_runtime_put_autosuspend(&sdd->pdev->dev);
|
||||
/* setup() returns with device de-selected */
|
||||
s3c64xx_spi_set_cs(spi, false);
|
||||
|
|
@ -1384,7 +1382,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
|
|||
dev_dbg(&pdev->dev, "\tIOmem=[%pR]\tFIFO %dbytes\n",
|
||||
mem_res, sdd->fifo_depth);
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -982,7 +982,6 @@ static int sprd_spi_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto err_rpm_put;
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -547,7 +547,6 @@ static int stm32_ospi_poll_status(struct spi_mem *mem,
|
|||
ret = stm32_ospi_send(mem->spi, op);
|
||||
mutex_unlock(&ospi->lock);
|
||||
|
||||
pm_runtime_mark_last_busy(ospi->dev);
|
||||
pm_runtime_put_autosuspend(ospi->dev);
|
||||
|
||||
return ret;
|
||||
|
|
@ -571,7 +570,6 @@ static int stm32_ospi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
|
|||
ret = stm32_ospi_send(mem->spi, op);
|
||||
mutex_unlock(&ospi->lock);
|
||||
|
||||
pm_runtime_mark_last_busy(ospi->dev);
|
||||
pm_runtime_put_autosuspend(ospi->dev);
|
||||
|
||||
return ret;
|
||||
|
|
@ -628,7 +626,6 @@ static ssize_t stm32_ospi_dirmap_read(struct spi_mem_dirmap_desc *desc,
|
|||
ret = stm32_ospi_send(desc->mem->spi, &op);
|
||||
mutex_unlock(&ospi->lock);
|
||||
|
||||
pm_runtime_mark_last_busy(ospi->dev);
|
||||
pm_runtime_put_autosuspend(ospi->dev);
|
||||
|
||||
return ret ?: len;
|
||||
|
|
@ -713,7 +710,6 @@ static int stm32_ospi_transfer_one_message(struct spi_controller *ctrl,
|
|||
msg->status = ret;
|
||||
spi_finalize_current_message(ctrl);
|
||||
|
||||
pm_runtime_mark_last_busy(ospi->dev);
|
||||
pm_runtime_put_autosuspend(ospi->dev);
|
||||
|
||||
return ret;
|
||||
|
|
@ -750,7 +746,6 @@ static int stm32_ospi_setup(struct spi_device *spi)
|
|||
|
||||
mutex_unlock(&ospi->lock);
|
||||
|
||||
pm_runtime_mark_last_busy(ospi->dev);
|
||||
pm_runtime_put_autosuspend(ospi->dev);
|
||||
|
||||
return 0;
|
||||
|
|
@ -953,7 +948,6 @@ static int stm32_ospi_probe(struct platform_device *pdev)
|
|||
goto err_pm_resume;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(ospi->dev);
|
||||
pm_runtime_put_autosuspend(ospi->dev);
|
||||
|
||||
return 0;
|
||||
|
|
@ -1032,7 +1026,6 @@ static int __maybe_unused stm32_ospi_resume(struct device *dev)
|
|||
|
||||
writel_relaxed(ospi->cr_reg, regs_base + OSPI_CR);
|
||||
writel_relaxed(ospi->dcr_reg, regs_base + OSPI_DCR1);
|
||||
pm_runtime_mark_last_busy(ospi->dev);
|
||||
pm_runtime_put_autosuspend(ospi->dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -463,7 +463,6 @@ static int stm32_qspi_poll_status(struct spi_mem *mem, const struct spi_mem_op *
|
|||
ret = stm32_qspi_send(mem->spi, op);
|
||||
mutex_unlock(&qspi->lock);
|
||||
|
||||
pm_runtime_mark_last_busy(qspi->dev);
|
||||
pm_runtime_put_autosuspend(qspi->dev);
|
||||
|
||||
return ret;
|
||||
|
|
@ -487,7 +486,6 @@ static int stm32_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
|
|||
ret = stm32_qspi_send(mem->spi, op);
|
||||
mutex_unlock(&qspi->lock);
|
||||
|
||||
pm_runtime_mark_last_busy(qspi->dev);
|
||||
pm_runtime_put_autosuspend(qspi->dev);
|
||||
|
||||
return ret;
|
||||
|
|
@ -543,7 +541,6 @@ static ssize_t stm32_qspi_dirmap_read(struct spi_mem_dirmap_desc *desc,
|
|||
ret = stm32_qspi_send(desc->mem->spi, &op);
|
||||
mutex_unlock(&qspi->lock);
|
||||
|
||||
pm_runtime_mark_last_busy(qspi->dev);
|
||||
pm_runtime_put_autosuspend(qspi->dev);
|
||||
|
||||
return ret ?: len;
|
||||
|
|
@ -627,7 +624,6 @@ static int stm32_qspi_transfer_one_message(struct spi_controller *ctrl,
|
|||
msg->status = ret;
|
||||
spi_finalize_current_message(ctrl);
|
||||
|
||||
pm_runtime_mark_last_busy(qspi->dev);
|
||||
pm_runtime_put_autosuspend(qspi->dev);
|
||||
|
||||
return ret;
|
||||
|
|
@ -684,7 +680,6 @@ static int stm32_qspi_setup(struct spi_device *spi)
|
|||
writel_relaxed(qspi->dcr_reg, qspi->io_base + QSPI_DCR);
|
||||
mutex_unlock(&qspi->lock);
|
||||
|
||||
pm_runtime_mark_last_busy(qspi->dev);
|
||||
pm_runtime_put_autosuspend(qspi->dev);
|
||||
|
||||
return 0;
|
||||
|
|
@ -858,7 +853,6 @@ static int stm32_qspi_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto err_pm_runtime_free;
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return 0;
|
||||
|
|
@ -938,7 +932,6 @@ static int __maybe_unused stm32_qspi_resume(struct device *dev)
|
|||
writel_relaxed(qspi->cr_reg, qspi->io_base + QSPI_CR);
|
||||
writel_relaxed(qspi->dcr_reg, qspi->io_base + QSPI_DCR);
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -2233,7 +2233,6 @@ static int stm32_spi_probe(struct platform_device *pdev)
|
|||
goto err_pm_disable;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
dev_info(&pdev->dev, "driver initialized (%s mode)\n",
|
||||
|
|
@ -2342,7 +2341,6 @@ static int __maybe_unused stm32_spi_resume(struct device *dev)
|
|||
|
||||
spi->cfg->config(spi);
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,6 @@ static int ti_qspi_setup(struct spi_device *spi)
|
|||
return ret;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(qspi->dev);
|
||||
ret = pm_runtime_put_autosuspend(qspi->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(qspi->dev, "pm_runtime_put_autosuspend() failed\n");
|
||||
|
|
@ -195,7 +194,6 @@ static void ti_qspi_setup_clk(struct ti_qspi *qspi, u32 speed_hz)
|
|||
ctx_reg->clkctrl = clk_ctrl_new;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(qspi->dev);
|
||||
pm_runtime_put_autosuspend(qspi->dev);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1330,7 +1330,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
|
|||
goto clk_dis_all;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1723,7 +1723,6 @@ EXPORT_SYMBOL_GPL(spi_finalize_current_transfer);
|
|||
static void spi_idle_runtime_pm(struct spi_controller *ctlr)
|
||||
{
|
||||
if (ctlr->auto_runtime_pm) {
|
||||
pm_runtime_mark_last_busy(ctlr->dev.parent);
|
||||
pm_runtime_put_autosuspend(ctlr->dev.parent);
|
||||
}
|
||||
}
|
||||
|
|
@ -3856,7 +3855,6 @@ static int spi_set_cs_timing(struct spi_device *spi)
|
|||
}
|
||||
|
||||
status = spi->controller->set_cs_timing(spi);
|
||||
pm_runtime_mark_last_busy(parent);
|
||||
pm_runtime_put_autosuspend(parent);
|
||||
} else {
|
||||
status = spi->controller->set_cs_timing(spi);
|
||||
|
|
@ -3991,7 +3989,6 @@ int spi_setup(struct spi_device *spi)
|
|||
status = 0;
|
||||
|
||||
spi_set_cs(spi, false, true);
|
||||
pm_runtime_mark_last_busy(spi->controller->dev.parent);
|
||||
pm_runtime_put_autosuspend(spi->controller->dev.parent);
|
||||
} else {
|
||||
spi_set_cs(spi, false, true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue