regulator: act8865: Remove redundant dev lookups
The local variable "dev" already contains a pointer to the device, so there is no need to take the address of "client->dev" again. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
768e66686c
commit
de14ba6737
|
@ -498,8 +498,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||||
act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config);
|
act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config);
|
||||||
if (IS_ERR(act8865->regmap)) {
|
if (IS_ERR(act8865->regmap)) {
|
||||||
ret = PTR_ERR(act8865->regmap);
|
ret = PTR_ERR(act8865->regmap);
|
||||||
dev_err(&client->dev, "Failed to allocate register map: %d\n",
|
dev_err(dev, "Failed to allocate register map: %d\n", ret);
|
||||||
ret);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +525,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||||
config.driver_data = act8865;
|
config.driver_data = act8865;
|
||||||
config.regmap = act8865->regmap;
|
config.regmap = act8865->regmap;
|
||||||
|
|
||||||
rdev = devm_regulator_register(&client->dev, desc, &config);
|
rdev = devm_regulator_register(dev, desc, &config);
|
||||||
if (IS_ERR(rdev)) {
|
if (IS_ERR(rdev)) {
|
||||||
dev_err(dev, "failed to register %s\n", desc->name);
|
dev_err(dev, "failed to register %s\n", desc->name);
|
||||||
return PTR_ERR(rdev);
|
return PTR_ERR(rdev);
|
||||||
|
|
Loading…
Reference in New Issue