All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: Make pcf50633_write_block() return 0 on success
@ 2012-02-14  3:30 Axel Lin
  2012-02-14  7:52 ` Harald Welte
  2012-02-23 15:34 ` Samuel Ortiz
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-02-14  3:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Harald Welte, Samuel Ortiz

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>
---
 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




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: Make pcf50633_write_block() return 0 on success
  2012-02-14  3:30 [PATCH] mfd: Make pcf50633_write_block() return 0 on success Axel Lin
@ 2012-02-14  7:52 ` Harald Welte
  2012-02-23 15:34 ` Samuel Ortiz
  1 sibling, 0 replies; 3+ messages in thread
From: Harald Welte @ 2012-02-14  7:52 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Samuel Ortiz

Hi Axel,

On Tue, Feb 14, 2012 at 11:30:31AM +0800, Axel Lin wrote:
> 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.

Acked-by: Harald Welte <laforge@gnumonks.org>

-- 
- Harald Welte <laforge@gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: Make pcf50633_write_block() return 0 on success
  2012-02-14  3:30 [PATCH] mfd: Make pcf50633_write_block() return 0 on success Axel Lin
  2012-02-14  7:52 ` Harald Welte
@ 2012-02-23 15:34 ` Samuel Ortiz
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2012-02-23 15:34 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Harald Welte

Hi Axel,

On Tue, Feb 14, 2012 at 11:30:31AM +0800, Axel Lin wrote:
> 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.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-23 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-14  3:30 [PATCH] mfd: Make pcf50633_write_block() return 0 on success Axel Lin
2012-02-14  7:52 ` Harald Welte
2012-02-23 15:34 ` Samuel Ortiz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.