summaryrefslogtreecommitdiff
path: root/drivers/regulator/act8865-regulator.c
diff options
context:
space:
mode:
authorMaarten ter Huurne <maarten@treewalker.org>2016-03-17 17:05:05 +0300
committerMark Brown <broonie@kernel.org>2016-03-21 20:52:07 +0300
commitde14ba67378df74c6328f75fd6972ef83ed4639b (patch)
treede365efcd9a551570a76a05de9e84a964d548db2 /drivers/regulator/act8865-regulator.c
parent768e66686cfe83f786f6ae26f1799cca69e80523 (diff)
downloadlinux-de14ba67378df74c6328f75fd6972ef83ed4639b.tar.xz
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>
Diffstat (limited to 'drivers/regulator/act8865-regulator.c')
-rw-r--r--drivers/regulator/act8865-regulator.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
index 000d566e32a4..89f856f257f7 100644
--- a/drivers/regulator/act8865-regulator.c
+++ b/drivers/regulator/act8865-regulator.c
@@ -498,8 +498,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config);
if (IS_ERR(act8865->regmap)) {
ret = PTR_ERR(act8865->regmap);
- dev_err(&client->dev, "Failed to allocate register map: %d\n",
- ret);
+ dev_err(dev, "Failed to allocate register map: %d\n", ret);
return ret;
}
@@ -526,7 +525,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
config.driver_data = act8865;
config.regmap = act8865->regmap;
- rdev = devm_regulator_register(&client->dev, desc, &config);
+ rdev = devm_regulator_register(dev, desc, &config);
if (IS_ERR(rdev)) {
dev_err(dev, "failed to register %s\n", desc->name);
return PTR_ERR(rdev);