diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-06-08 12:55:58 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2019-06-23 18:02:47 +0200 |
commit | 71d7ffb29b6b9b492b2b14348dabc3c144456788 (patch) | |
tree | 8fd8f2c33a17c04111c94e671394a2fd711e58d3 /drivers/power | |
parent | 124db1f91b00c1076a20d616ee007762323e7fab (diff) | |
download | linux-71d7ffb29b6b9b492b2b14348dabc3c144456788.tar.gz linux-71d7ffb29b6b9b492b2b14348dabc3c144456788.tar.bz2 linux-71d7ffb29b6b9b492b2b14348dabc3c144456788.zip |
power: supply: max14656_charger_detector: 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.
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>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/max14656_charger_detector.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/max14656_charger_detector.c b/drivers/power/supply/max14656_charger_detector.c index 9e6472834e37..f27b780d2c02 100644 --- a/drivers/power/supply/max14656_charger_detector.c +++ b/drivers/power/supply/max14656_charger_detector.c @@ -251,7 +251,7 @@ static void stop_irq_work(void *data) static int max14656_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 power_supply_config psy_cfg = {}; struct max14656_chip *chip; |