On 12/23/25 11:04, Bartosz Golaszewski wrote:
quoted hunk ↗ jump to hunk
Configure the parent device and the OF-node using dedicated fields in
struct i2c_adapter and avoid dereferencing the internal struct device.
Signed-off-by: Bartosz Golaszewski <redacted>
---
drivers/i2c/busses/i2c-st.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index 97d70e66722706f242cd97153387c3a865abc12d..b50be2c39eaa4b9b95a71b038a4d63f3c5fd7c4b 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -849,8 +849,8 @@ static int st_i2c_probe(struct platform_device *pdev)
adap->retries = 0;
adap->algo = &st_i2c_algo;
adap->bus_recovery_info = &st_i2c_recovery_info;
- adap->dev.parent = &pdev->dev;
- adap->dev.of_node = pdev->dev.of_node;
+ adap->parent = &pdev->dev;
+ adap->of_node = pdev->dev.of_node;
init_completion(&i2c_dev->complete);
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Thanks
Patrice