summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-06-08 12:56:02 +0200
committerSebastian Reichel <sre@kernel.org>2019-06-23 18:03:20 +0200
commitbf0e482aefe1dad509f6f2b843bf7461c53ce052 (patch)
tree4c79523100237c3a0eb78eeb846fc81a24cb3c6f /drivers/power
parentdf324c606aafa16045542b3129de577d7a4ca3b6 (diff)
downloadlinux-bf0e482aefe1dad509f6f2b843bf7461c53ce052.tar.bz2
power: supply: rt9455_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/rt9455_charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/rt9455_charger.c b/drivers/power/supply/rt9455_charger.c
index cfdbde9daf94..eaa9d6faa874 100644
--- a/drivers/power/supply/rt9455_charger.c
+++ b/drivers/power/supply/rt9455_charger.c
@@ -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 = {};