misc: isl29003: simplify getting the adapter of a client
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 8 Jun 2019 10:55:52 +0000 (12:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Jun 2019 15:29:49 +0000 (17:29 +0200)
We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/isl29003.c

index 3431a82..5d0d0c3 100644 (file)
@@ -377,7 +377,7 @@ static int isl29003_init_client(struct i2c_client *client)
 static int isl29003_probe(struct i2c_client *client,
                                    const struct i2c_device_id *id)
 {
-       struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
+       struct i2c_adapter *adapter = client->adapter;
        struct isl29003_data *data;
        int err = 0;