[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220801023824.1595268-1-ye.xingchen@zte.com.cn>
Date: Mon, 1 Aug 2022 02:38:24 +0000
From: cgel.zte@...il.com
To: linux-kernel@...r.kernel.org
Cc: linux-pm@...r.kernel.org, ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] thermal/drivers/k3_j72xx_bandgap:using the pm_runtime_resume_and_get to simplify the code
From: ye xingchen <ye.xingchen@....com.cn>
Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync
and pm_runtime_put_noidle.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
drivers/thermal/k3_j72xx_bandgap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c
index 115a44eb4fbf..5aabb89cf46d 100644
--- a/drivers/thermal/k3_j72xx_bandgap.c
+++ b/drivers/thermal/k3_j72xx_bandgap.c
@@ -403,9 +403,8 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
workaround_needed = driver_data->has_errata_i2128;
pm_runtime_enable(dev);
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret < 0) {
- pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);
return ret;
}
--
2.25.1
Powered by blists - more mailing lists