summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Tran <alex.tran@oss.qualcomm.com>2026-08-26 10:19:26 -0700
committerAndi Shyti <andi.shyti@linux.intel.com>2026-09-09 11:52:15 +0200
commit7659ba45c535cb43c7a354aa8a43ca9ae57915fb (patch)
treec29626d33e1bcc0d78a77e8d562e025c6436d739
parent6bbac64095dfa606fac5fe87e9161913cae92294 (diff)
downloadlinux-next-7659ba45c535cb43c7a354aa8a43ca9ae57915fb.tar.gz
linux-next-7659ba45c535cb43c7a354aa8a43ca9ae57915fb.zip
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 <alex.tran@oss.qualcomm.com> Reviewed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patch.msgid.link/20260826-i2c-qcom-geni-pm-runtime-resume-get-v1-1-25ee55d1f0c8@oss.qualcomm.com
-rw-r--r--drivers/i2c/busses/i2c-qcom-geni.c3
1 files changed, 1 insertions, 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;