Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Minghao Chi and committed by
Mark Brown
c03ae487 58b1efe2

+1 -2
+1 -2
drivers/spi/spi-ti-qspi.c
··· 172 172 dev_dbg(qspi->dev, "hz: %d, clock divider %d\n", 173 173 qspi->spi_max_frequency, clk_div); 174 174 175 - ret = pm_runtime_get_sync(qspi->dev); 175 + ret = pm_runtime_resume_and_get(qspi->dev); 176 176 if (ret < 0) { 177 - pm_runtime_put_noidle(qspi->dev); 178 177 dev_err(qspi->dev, "pm_runtime_get_sync() failed\n"); 179 178 return ret; 180 179 }