diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2022-09-22 17:02:32 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-23 19:21:48 +0200 |
commit | c79ce0a2824bc987ee4cd19f6a0a4e1eb493a8d8 (patch) | |
tree | 52f875a215b0d59c1b6587a2ad73ce5bf7c6a838 /drivers/spi | |
parent | spi: aspeed: Remove redundant dev_err call (diff) | |
download | linux-c79ce0a2824bc987ee4cd19f6a0a4e1eb493a8d8.tar.xz linux-c79ce0a2824bc987ee4cd19f6a0a4e1eb493a8d8.zip |
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')
-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); |