Commit c03ae487 authored by Minghao Chi's avatar Minghao Chi Committed by Mark Brown

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220408080931.2494356-1-chi.minghao@zte.com.cnSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 58b1efe2
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment