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

spi: img-spfi: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Using the newest pm_runtime_resume_and_get is more appropriate
for simplifing code here.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220922150232.115843-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Zhang Qilong and committed by
Mark Brown
c79ce0a2 04e0456f

+2 -4
+2 -4
drivers/spi/spi-img-spfi.c
··· 730 730 struct img_spfi *spfi = spi_master_get_devdata(master); 731 731 int ret; 732 732 733 - ret = pm_runtime_get_sync(dev); 734 - if (ret < 0) { 735 - pm_runtime_put_noidle(dev); 733 + ret = pm_runtime_resume_and_get(dev); 734 + if (ret < 0) 736 735 return ret; 737 - } 738 736 spfi_reset(spfi); 739 737 pm_runtime_put(dev); 740 738