]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
power: supply: rt9455_charger: simplify getting the adapter of a client
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 8 Jun 2019 10:56:02 +0000 (12:56 +0200)
committerSebastian Reichel <sre@kernel.org>
Sun, 23 Jun 2019 16:03:20 +0000 (18:03 +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>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/rt9455_charger.c

index cfdbde9daf94bd3c88a6e0ffd36a3658c40a2cf1..eaa9d6faa8745cea2d91a6d1d1845c7b2ec75fcc 100644 (file)
@@ -1593,7 +1593,7 @@ static const struct regmap_config rt9455_regmap_config = {
 static int rt9455_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 device *dev = &client->dev;
        struct rt9455_info *info;
        struct power_supply_config rt9455_charger_config = {};