Skip to contentSkip to conversation

mfd: Make pcf50633_write_block() return 0 on success

PATCH Applied Axel Lin 3 participants 3 messages Feb 14, 2012 – Feb 23, 2012 Multifunction devices (MFD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/mfd/pcf50633-core.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
drivers/mfd/pcf50633-core.c +1 -7
index ff1a7e7..189c2f0 100644
@@ -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);
 
Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw

Hi Axel,

Quoted 3 lines · Axel Lin

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.

This change seems to make a lot of sense, thanks for spotting it.

Signature · 4 lines
- Harald Welte <[email protected]>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)
Applied
#2 lore raw
In reply to Axel Lin

Hi Axel,

Quoted 6 lines · Axel Lin

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.

Applied as well, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/