forked from Minki/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>
This commit is contained in:
parent
04e0456f77
commit
c79ce0a282
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user