diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-06-08 12:56:04 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-10 16:40:36 +0200 |
commit | 6b96092a6bfa65566dda2f5a68a559a743b8d132 (patch) | |
tree | f1a2bf8385a2a3be3fe69d231c653ccc2d2e03fb /drivers/regulator/max8952.c | |
parent | regulator: cpcap: Spelling s/configuraion/configuration/ (diff) | |
download | linux-6b96092a6bfa65566dda2f5a68a559a743b8d132.tar.xz linux-6b96092a6bfa65566dda2f5a68a559a743b8d132.zip |
regulator: max8952: 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>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/max8952.c')
-rw-r--r-- | drivers/regulator/max8952.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index cf2a2912cb1b..451237efb359 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -192,7 +192,7 @@ static struct max8952_platform_data *max8952_parse_dt(struct device *dev) static int max8952_pmic_probe(struct i2c_client *client, const struct i2c_device_id *i2c_id) { - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; struct max8952_platform_data *pdata = dev_get_platdata(&client->dev); struct regulator_config config = { }; struct max8952_data *max8952; |