Thread (18 messages) 18 messages, 6 authors, 2026-01-06
STALE166d

[PATCH 10/12] i2c: gpio: set device parent and of_node through the adapter struct

From: Bartosz Golaszewski <hidden>
Date: 2025-12-23 10:05:20
Also in: imx, linux-arm-msm, linux-i2c, linux-omap, linux-renesas-soc, lkml
Subsystem: generic gpio i2c driver, i2c subsystem, i2c subsystem host drivers, the rest · Maintainers: Wolfram Sang, Andi Shyti, Linus Torvalds

Configure the parent device using the dedicated field in struct
i2c_adapter and avoid dereferencing the internal struct device.

Signed-off-by: Bartosz Golaszewski <redacted>
---
 drivers/i2c/busses/i2c-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index f4355b17bfbf15c402e71096ccbb99f5a35bb479..78f8bc2525be6d1fd9a7907df4c253f33bbec9f0 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -425,7 +425,7 @@ static int i2c_gpio_probe(struct platform_device *pdev)
 
 	adap->algo_data = bit_data;
 	adap->class = I2C_CLASS_HWMON;
-	adap->dev.parent = dev;
+	adap->parent = dev;
 	device_set_node(&adap->dev, fwnode);
 
 	adap->nr = pdev->id;
-- 
2.47.3

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help