summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp3971.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 19:01:30 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 19:01:30 +0200
commit580287628cdd99366b10c9050c4479b387283be8 (patch)
tree754d9fe5d15db31497e45d542e816895d20a7e92 /drivers/regulator/lp3971.c
parentMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/same... (diff)
parentregulator: Remove default DEBUG define from TPS6586x (diff)
downloadlinux-580287628cdd99366b10c9050c4479b387283be8.tar.xz
linux-580287628cdd99366b10c9050c4479b387283be8.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (22 commits) regulator: Remove default DEBUG define from TPS6586x regulator: tps6507x - add missing platform_set_drvdata in tps6507x_pmic_probe regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove() mfd: max8998 - fix incorrect kfree(i2c) in i2c_driver probe callback handler regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() regulator: max8660 - fix a memory leak in max8660_remove() regulator: max1586 - fix a memory leak in max1586_pmic_remove() regulator: Default GPIO controlled WM8994 regulators to disabled regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() max8998: fix off-by-one value range checking regulator: tps6586x: fix millivolt return values and SM2 table regulator: tps6586x: add dependancy on MFD_TPS6585x regulator: add TPS6586X regulator driver regulator: MAX8998: set_voltage bugfix. ramp_up delay and min/max voltage regulator: add support for regulators on the ab8500 MFD ab8500-mfd: add regulator support to ab8500 mfd device tps65023: Allow registering similar TPS65021 drivers: regulators: depend on MFD_MAX8998 drivers: regulator: add Maxim 8998 driver ISL6271A voltage regulator support. ...
Diffstat (limited to 'drivers/regulator/lp3971.c')
-rw-r--r--drivers/regulator/lp3971.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index 8ae3732eb24b..3bb82b624e19 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -377,7 +377,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
if (count != 1)
return -EIO;
ret = i2c_smbus_read_byte_data(i2c, reg);
- if (ret < 0 || count != 1)
+ if (ret < 0)
return -EIO;
*dest = ret;
@@ -387,15 +387,9 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
static int lp3971_i2c_write(struct i2c_client *i2c, char reg, int count,
const u16 *src)
{
- int ret;
-
if (count != 1)
return -EIO;
- ret = i2c_smbus_write_byte_data(i2c, reg, *src);
- if (ret >= 0)
- return 0;
-
- return ret;
+ return i2c_smbus_write_byte_data(i2c, reg, *src);
}
static u8 lp3971_reg_read(struct lp3971 *lp3971, u8 reg)