diff mbox series

[09/16] i2c: mux: Set adapter supplier

Message ID 20250407145546.270683-10-herve.codina@bootlin.com (mailing list archive)
State New
Headers show
Series lan966x pci device: Add support for SFPs | expand

Commit Message

Herve Codina April 7, 2025, 2:55 p.m. UTC
For i2c muxes, the parent of the mux adapter dev is the adapter dev the
mux is connected to.

This parent is not the supplier of the mux adapter. Indeed, the supplier
of the mux adapter is the mux device itself.

Fill the adap.supplier with the mux device.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 drivers/i2c/i2c-mux.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index fda72e8be885..d8bdb3b40acf 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -318,6 +318,7 @@  int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
 	priv->adap.algo = &priv->algo;
 	priv->adap.algo_data = priv;
 	priv->adap.dev.parent = &parent->dev;
+	priv->adap.supplier = muxc->dev;
 	priv->adap.retries = parent->retries;
 	priv->adap.timeout = parent->timeout;
 	priv->adap.quirks = parent->quirks;