summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-06-08 12:55:59 +0200
committerSebastian Reichel <sre@kernel.org>2019-06-23 18:02:53 +0200
commit4e9c406dbea8c9b28a7ac38c5fa2bd1d006240be (patch)
tree349e9508c5d4723f2a7c47920f749856300e465c /drivers/power
parent71d7ffb29b6b9b492b2b14348dabc3c144456788 (diff)
power: supply: max17040_battery: 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/max17040_battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c
index 91cafc7bed30..62499018e68b 100644
--- a/drivers/power/supply/max17040_battery.c
+++ b/drivers/power/supply/max17040_battery.c
@@ -193,7 +193,7 @@ static const struct power_supply_desc max17040_battery_desc = {
static int max17040_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 power_supply_config psy_cfg = {};
struct max17040_chip *chip;