diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2022-09-22 23:02:32 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-23 18:21:48 +0100 |
commit | c79ce0a2824bc987ee4cd19f6a0a4e1eb493a8d8 (patch) | |
tree | 52f875a215b0d59c1b6587a2ad73ce5bf7c6a838 /drivers/spi/spi-img-spfi.c | |
parent | 04e0456f778de550a14d222d1a9ae0625511244d (diff) |
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>
Diffstat (limited to 'drivers/spi/spi-img-spfi.c')
-rw-r--r-- | drivers/spi/spi-img-spfi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index 71376b6df89d..bfd12247f173 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -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); |