1

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>
This commit is contained in:
Zhang Qilong 2022-09-22 23:02:32 +08:00 committed by Mark Brown
parent 04e0456f77
commit c79ce0a282
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -730,11 +730,9 @@ static int img_spfi_resume(struct device *dev)
struct img_spfi *spfi = spi_master_get_devdata(master);
int ret;
ret = pm_runtime_get_sync(dev);
if (ret < 0) {
pm_runtime_put_noidle(dev);
ret = pm_runtime_resume_and_get(dev);
if (ret < 0)
return ret;
}
spfi_reset(spfi);
pm_runtime_put(dev);