[PATCH] mfd: Make pcf50633_write_block() return 0 on success

From: Axel Lin
Date: Mon Feb 13 2012 - 22:30:38 EST


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@xxxxxxxxx>
---
drivers/mfd/pcf50633-core.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index ff1a7e7..189c2f0 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);

--
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/