public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: Ensure value written by wm831x_set_bits() is within the mask
@ 2011-06-20 11:25 Mark Brown
  2011-06-20 14:57 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-06-20 11:25 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-kernel, patches, Mark Brown

Purely for defensiveness.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/mfd/wm831x-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c
index 02c9109..6c53376 100644
--- a/drivers/mfd/wm831x-core.c
+++ b/drivers/mfd/wm831x-core.c
@@ -260,7 +260,7 @@ int wm831x_set_bits(struct wm831x *wm831x, unsigned short reg,
 		goto out;
 
 	r &= ~mask;
-	r |= val;
+	r |= val & mask;
 
 	ret = wm831x_write(wm831x, reg, 2, &r);
 
-- 
1.7.5.4


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

* Re: [PATCH] mfd: Ensure value written by wm831x_set_bits() is within the mask
  2011-06-20 11:25 [PATCH] mfd: Ensure value written by wm831x_set_bits() is within the mask Mark Brown
@ 2011-06-20 14:57 ` Samuel Ortiz
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2011-06-20 14:57 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, patches

Hi Mark,

On Mon, Jun 20, 2011 at 12:25:58PM +0100, Mark Brown wrote:
> Purely for defensiveness.
Ok, applied too.

Cheers,
Samuel.

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

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

end of thread, other threads:[~2011-06-20 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20 11:25 [PATCH] mfd: Ensure value written by wm831x_set_bits() is within the mask Mark Brown
2011-06-20 14:57 ` Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox