summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-02-14 04:30:31 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-03-06 18:46:44 +0100
commit60b5c5a435007af5fe9f05483ff2a26aacb5fe78 (patch)
tree21c1fdaf34e819010c7e14953234674eb4221966
parentmfd: Fix val_len parameters for s5m-core regmap_raw_write (diff)
downloadlinux-60b5c5a435007af5fe9f05483ff2a26aacb5fe78.tar.xz
linux-60b5c5a435007af5fe9f05483ff2a26aacb5fe78.zip
mfd: Make pcf50633_write_block() return 0 on success
The callers of pcf50633_write_block assume pcf50633_write_block return 0 on success, thus make it return 0 instead of the number of registers written on success. Currently pcf50633_write_block is called in drivers/mfd/pcf50633-irq.c and drivers/rtc/rtc-pcf50633.c. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Harald Welte <laforge@gnumonks.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/mfd/pcf50633-core.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index ff1a7e741ecd..189c2f07b83f 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -46,13 +46,7 @@ EXPORT_SYMBOL_GPL(pcf50633_read_block);
int pcf50633_write_block(struct pcf50633 *pcf , u8 reg,
int nr_regs, u8 *data)
{
- int ret;
-
- ret = regmap_raw_write(pcf->regmap, reg, data, nr_regs);
- if (ret != 0)
- return ret;
-
- return nr_regs;
+ return regmap_raw_write(pcf->regmap, reg, data, nr_regs);
}
EXPORT_SYMBOL_GPL(pcf50633_write_block);