From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Jean Delvare <jdelvare@suse.com>,
Andi Shyti <andi.shyti@kernel.org>,
Shyam Sundar S K <shyam-sundar.s-k@amd.com>,
Nirujogi Pratap <pratap.nirujogi@amd.com>,
Bin Du <bin.du@amd.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jan Dabros <jsd@semihalf.com>,
Gregory CLEMENT <gregory.clement@bootlin.com>,
Hans Hu <hanshu@zhaoxin.com>
Cc: Bartosz Golaszewski <brgl@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH v2 4/4] i2c: mv64xxx: use i2c_adapter_dev()
Date: Mon, 23 Feb 2026 10:02:52 +0100 [thread overview]
Message-ID: <20260223-i2c-adapter-dev-wrapper-v2-4-d02946569773@oss.qualcomm.com> (raw)
In-Reply-To: <20260223-i2c-adapter-dev-wrapper-v2-0-d02946569773@oss.qualcomm.com>
Use i2c_adapter_dev() where applicable in order to avoid direct
dereferencing of struct device embedded within struct i2c_adapter.
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
drivers/i2c/busses/i2c-mv64xxx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 1acba628e16c3bd1dbf82c777162870cbe3815ef..7892793d2a1cabf3376efcec1d031c3d764f7731 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -747,7 +747,7 @@ mv64xxx_i2c_xfer_core(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
struct mv64xxx_i2c_data *drv_data = i2c_get_adapdata(adap);
int rc, ret = num;
- rc = pm_runtime_resume_and_get(&adap->dev);
+ rc = pm_runtime_resume_and_get(i2c_adapter_dev(adap));
if (rc)
return rc;
@@ -766,7 +766,7 @@ mv64xxx_i2c_xfer_core(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
drv_data->num_msgs = 0;
drv_data->msgs = NULL;
- pm_runtime_put_autosuspend(&adap->dev);
+ pm_runtime_put_autosuspend(i2c_adapter_dev(adap));
return ret;
}
--
2.47.3
next prev parent reply other threads:[~2026-02-23 9:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 9:02 [PATCH v2 0/4] i2c: provide and use i2c_adapter_dev() Bartosz Golaszewski
2026-02-23 9:02 ` [PATCH v2 1/4] i2c: provide i2c_adapter_dev() Bartosz Golaszewski
2026-02-23 9:02 ` [PATCH v2 2/4] i2c: piix4: use i2c_adapter_dev() Bartosz Golaszewski
2026-02-23 9:02 ` [PATCH v2 3/4] i2c: amd-asf-plat: " Bartosz Golaszewski
2026-02-23 9:02 ` Bartosz Golaszewski [this message]
2026-02-23 9:13 ` [PATCH v2 4/4] i2c: mv64xxx: " Andy Shevchenko
2026-02-23 9:23 ` Bartosz Golaszewski
2026-02-23 11:37 ` Andy Shevchenko
2026-02-23 9:15 ` [PATCH v2 0/4] i2c: provide and " Andy Shevchenko
2026-02-26 20:23 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260223-i2c-adapter-dev-wrapper-v2-4-d02946569773@oss.qualcomm.com \
--to=bartosz.golaszewski@oss.qualcomm.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bin.du@amd.com \
--cc=brgl@kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=hanshu@zhaoxin.com \
--cc=jdelvare@suse.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=pratap.nirujogi@amd.com \
--cc=shyam-sundar.s-k@amd.com \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox