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:
Wolfram Sang 2019-06-10 11:51:56 +02:00 committed by Rob Herring
parent 5c68b8231e
commit 272d28bdae
1 changed files with 1 additions and 1 deletions

View File

@ -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;