summaryrefslogtreecommitdiff
path: root/drivers/regulator/isl6271a-regulator.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2011-02-01 08:16:22 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-02-01 08:16:22 +0300
commita1f3d4bba8ea395a39d34ade6017afee8be16031 (patch)
tree874d843d35622f17aa6c3e048e42cf0d679bcb75 /drivers/regulator/isl6271a-regulator.c
parent723d928417bffff6467da155d8ebbbe016464012 (diff)
parentebf53826e105f488f4f628703a108e98940d1dc5 (diff)
downloadlinux-a1f3d4bba8ea395a39d34ade6017afee8be16031.tar.xz
Merge commit 'v2.6.38-rc3' into next
Diffstat (limited to 'drivers/regulator/isl6271a-regulator.c')
-rw-r--r--drivers/regulator/isl6271a-regulator.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c
index b8cc6389a541..e4b3592e8176 100644
--- a/drivers/regulator/isl6271a-regulator.c
+++ b/drivers/regulator/isl6271a-regulator.c
@@ -58,7 +58,9 @@ out:
return data;
}
-static int isl6271a_set_voltage(struct regulator_dev *dev, int minuV, int maxuV)
+static int isl6271a_set_voltage(struct regulator_dev *dev,
+ int minuV, int maxuV,
+ unsigned *selector)
{
struct isl_pmic *pmic = rdev_get_drvdata(dev);
int vsel, err, data;
@@ -78,6 +80,8 @@ static int isl6271a_set_voltage(struct regulator_dev *dev, int minuV, int maxuV)
/* Convert the microvolts to data for the chip */
data = (vsel - ISL6271A_VOLTAGE_MIN) / ISL6271A_VOLTAGE_STEP;
+ *selector = data;
+
mutex_lock(&pmic->mtx);
err = i2c_smbus_write_byte(pmic->client, data);
@@ -169,7 +173,7 @@ static int __devinit isl6271a_probe(struct i2c_client *i2c,
init_data, pmic);
if (IS_ERR(pmic->rdev[i])) {
dev_err(&i2c->dev, "failed to register %s\n", id->name);
- err = PTR_ERR(pmic->rdev);
+ err = PTR_ERR(pmic->rdev[i]);
goto error;
}
}