mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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>
This commit is contained in:
parent
58b1efe2c1
commit
c03ae4876f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user