of: unittest: simplify getting the adapter of a client
We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Reported-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
5c68b8231e
commit
272d28bdae
|
@ -1946,7 +1946,7 @@ static int unittest_i2c_mux_probe(struct i2c_client *client,
|
|||
{
|
||||
int i, nchans;
|
||||
struct device *dev = &client->dev;
|
||||
struct i2c_adapter *adap = to_i2c_adapter(dev->parent);
|
||||
struct i2c_adapter *adap = client->adapter;
|
||||
struct device_node *np = client->dev.of_node, *child;
|
||||
struct i2c_mux_core *muxc;
|
||||
u32 reg, max_reg;
|
||||
|
|
Loading…
Reference in New Issue