misc: fsa9480: simplify getting the adapter of a client
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 8 Jun 2019 10:55:51 +0000 (12:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Jun 2019 15:29:50 +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/fsa9480.c

index 607b489..a812679 100644 (file)
@@ -410,7 +410,7 @@ static int fsa9480_irq_init(struct fsa9480_usbsw *usbsw)
 static int fsa9480_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 fsa9480_usbsw *usbsw;
        int ret = 0;