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

spi: spi-sprd: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220414085506.2541732-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Minghao Chi and committed by
Mark Brown
b9db82e5 cc470d55

+1 -2
+1 -2
drivers/spi/spi-sprd.c
··· 1008 1008 struct sprd_spi *ss = spi_controller_get_devdata(sctlr); 1009 1009 int ret; 1010 1010 1011 - ret = pm_runtime_get_sync(ss->dev); 1011 + ret = pm_runtime_resume_and_get(ss->dev); 1012 1012 if (ret < 0) { 1013 - pm_runtime_put_noidle(ss->dev); 1014 1013 dev_err(ss->dev, "failed to resume SPI controller\n"); 1015 1014 return ret; 1016 1015 }