diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-04-08 08:09:31 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-19 13:13:45 +0100 |
commit | c03ae4876fd54822a22375aa4fc49736a8c3a5d4 (patch) | |
tree | cefcb7ed6313e32a1aa618a03013cec9a36f93d5 | |
parent | 58b1efe2c1722cb47e5b1f49b79a50338428acbf (diff) |
spi: spi-ti-qspi: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220408080931.2494356-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-ti-qspi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 081da1fd3fd7..b5b65d882d7a 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -172,9 +172,8 @@ static int ti_qspi_setup(struct spi_device *spi) dev_dbg(qspi->dev, "hz: %d, clock divider %d\n", qspi->spi_max_frequency, clk_div); - ret = pm_runtime_get_sync(qspi->dev); + ret = pm_runtime_resume_and_get(qspi->dev); if (ret < 0) { - pm_runtime_put_noidle(qspi->dev); dev_err(qspi->dev, "pm_runtime_get_sync() failed\n"); return ret; } |