summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2022-09-22 17:02:32 +0200
committerMark Brown <broonie@kernel.org>2022-09-23 19:21:48 +0200
commitc79ce0a2824bc987ee4cd19f6a0a4e1eb493a8d8 (patch)
tree52f875a215b0d59c1b6587a2ad73ce5bf7c6a838 /drivers/spi
parentspi: aspeed: Remove redundant dev_err call (diff)
downloadlinux-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.c6
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);