rtc: rx6110: simplify getting the adapter of a client
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 18 Sep 2021 21:35:51 +0000 (23:35 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 25 Sep 2021 21:27:39 +0000 (23:27 +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: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210918213553.14514-1-wsa+renesas@sang-engineering.com
drivers/rtc/rtc-rx6110.c

index f4d4250..758fd6e 100644 (file)
@@ -422,7 +422,7 @@ static struct regmap_config regmap_i2c_config = {
 static int rx6110_i2c_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 rx6110_data *rx6110;
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA