From: Wolfram Sang Date: Sat, 8 Jun 2019 10:56:04 +0000 (+0200) Subject: regulator: max8952: simplify getting the adapter of a client X-Git-Tag: v5.15~5598^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b96092a6bfa65566dda2f5a68a559a743b8d132;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index cf2a291..451237e 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;