cd51d97006918f0d427dc4c7b9d0947716a4d190
[openwrt/staging/ldir.git] /
1 From 517f6e2641a2802dce5a5aa0d18c7d37a35678d2 Mon Sep 17 00:00:00 2001
2 From: Minghao Chi <chi.minghao@zte.com.cn>
3 Date: Fri, 29 Apr 2022 17:26:54 +0100
4 Subject: [PATCH] nvmem: qfprom: using pm_runtime_resume_and_get instead of
5 pm_runtime_get_sync
6
7 Using pm_runtime_resume_and_get is more appropriate
8 for simplifing code
9
10 Reported-by: Zeal Robot <zealci@zte.com.cn>
11 Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
12 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
13 Link: https://lore.kernel.org/r/20220429162701.2222-10-srinivas.kandagatla@linaro.org
14 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15 ---
16 drivers/nvmem/qfprom.c | 3 +--
17 1 file changed, 1 insertion(+), 2 deletions(-)
18
19 --- a/drivers/nvmem/qfprom.c
20 +++ b/drivers/nvmem/qfprom.c
21 @@ -217,9 +217,8 @@ static int qfprom_enable_fuse_blowing(co
22 goto err_clk_rate_set;
23 }
24
25 - ret = pm_runtime_get_sync(priv->dev);
26 + ret = pm_runtime_resume_and_get(priv->dev);
27 if (ret < 0) {
28 - pm_runtime_put_noidle(priv->dev);
29 dev_err(priv->dev, "Failed to enable power-domain\n");
30 goto err_reg_enable;
31 }