From: Luca Ceresoli Date: Wed, 3 Oct 2018 15:50:23 +0000 (+0200) Subject: i2c: mux: ltc4306: simplify code to reach the adapter X-Git-Tag: v5.15~7695^2~5^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df6dd24f76641ba4216a6008a38956e245c6129b;p=platform%2Fkernel%2Flinux-starfive.git i2c: mux: ltc4306: simplify code to reach the adapter struct i2c_client has a direct pointer to the adapter, no need to dig it out of the struct device tree. Suggested-by: Peter Rosin Signed-off-by: Luca Ceresoli Acked-by: Wolfram Sang Signed-off-by: Peter Rosin --- diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c index a9af932..83a7146 100644 --- a/drivers/i2c/muxes/i2c-mux-ltc4306.c +++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c @@ -208,7 +208,7 @@ MODULE_DEVICE_TABLE(of, ltc4306_of_match); static int ltc4306_probe(struct i2c_client *client) { - struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adap = client->adapter; const struct chip_desc *chip; struct i2c_mux_core *muxc; struct ltc4306 *data;