From 7659ba45c535cb43c7a354aa8a43ca9ae57915fb Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Wed, 26 Aug 2026 10:19:26 -0700 Subject: [PATCH] i2c: busses: Use pm_runtime_resume_and_get() Utilize the provided pm_runtime_resume_and_get api to increase the usage count and call the rpm resume callback. Upon failure, the function takes care of calling pm_runtime_put_noidle. Remove the explicit call to put no idle. No functional change added. Signed-off-by: Alex Tran Reviewed-by: Mukesh Kumar Savaliya Signed-off-by: Andi Shyti Link: https://patch.msgid.link/20260826-i2c-qcom-geni-pm-runtime-resume-get-v1-1-25ee55d1f0c8@oss.qualcomm.com --- drivers/i2c/busses/i2c-qcom-geni.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 00013b41a6f5..942cfeee99ba 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -963,10 +963,9 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, struct geni_i2c_dev *gi2c = i2c_get_adapdata(adap); int ret; - ret = pm_runtime_get_sync(gi2c->se.dev); + ret = pm_runtime_resume_and_get(gi2c->se.dev); if (ret < 0) { dev_err(gi2c->se.dev, "error turning SE resources:%d\n", ret); - pm_runtime_put_noidle(gi2c->se.dev); /* Set device in suspended since resume failed */ pm_runtime_set_suspended(gi2c->se.dev); return ret; -- knotmirror 0.0.1