]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: Make pcf50633_write_block() return 0 on success
authorAxel Lin <axel.lin@gmail.com>
Tue, 14 Feb 2012 03:30:31 +0000 (11:30 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 6 Mar 2012 17:46:44 +0000 (18:46 +0100)
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>
drivers/mfd/pcf50633-core.c

index ff1a7e741ecdfc6d8eb3d27cacaa47a1b492768a..189c2f07b83f4331af92528886864e0f5c5fa1d7 100644 (file)
@@ -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);