summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-06-08 12:55:55 +0200
committerSebastian Reichel <sre@kernel.org>2019-06-23 18:02:09 +0200
commit37669d9ff5cf116bb9b6b5968386df9aca4e680a (patch)
tree5665dca4f413c33db1b9548d4a20831966144d3e /drivers/power
parenta188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff)
power: supply: bq24190_charger: 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/bq24190_charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index cc0dfdc9e85a..ec03521c46d1 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -1700,7 +1700,7 @@ static int bq24190_get_config(struct bq24190_dev_info *bdi)
static int bq24190_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 charger_cfg = {}, battery_cfg = {};
struct bq24190_dev_info *bdi;