public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: lm3533-core: Fix calling regmap_update_bits() with mask and val arguments swapped
@ 2012-05-10 15:35 Axel Lin
  2012-05-10 15:49 ` Johan Hovold
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2012-05-10 15:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: Johan Hovold, Mark Brown, Samuel Ortiz

Current code calls regmap_update_bits() with mask and val arguments swapped.
Fix it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/mfd/lm3533-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/lm3533-core.c b/drivers/mfd/lm3533-core.c
index 75f4b7f..4a006c2 100644
--- a/drivers/mfd/lm3533-core.c
+++ b/drivers/mfd/lm3533-core.c
@@ -128,7 +128,7 @@ int lm3533_update(struct lm3533 *lm3533, u8 reg, u8 val, u8 mask)
 
 	dev_dbg(lm3533->dev, "update [%02x]: %02x/%02x\n", reg, val, mask);
 
-	ret = regmap_update_bits(lm3533->regmap, reg, val, mask);
+	ret = regmap_update_bits(lm3533->regmap, reg, mask, val);
 	if (ret < 0) {
 		dev_err(lm3533->dev, "failed to update register %02x: %d\n",
 								reg, ret);
-- 
1.7.5.4




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

* Re: [PATCH] mfd: lm3533-core: Fix calling regmap_update_bits() with mask and val arguments swapped
  2012-05-10 15:35 [PATCH] mfd: lm3533-core: Fix calling regmap_update_bits() with mask and val arguments swapped Axel Lin
@ 2012-05-10 15:49 ` Johan Hovold
  2012-05-11 13:36   ` Samuel Ortiz
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Hovold @ 2012-05-10 15:49 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Mark Brown, Samuel Ortiz

On Thu, May 10, 2012 at 11:35:02PM +0800, Axel Lin wrote:
> Current code calls regmap_update_bits() with mask and val arguments swapped.
> Fix it.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Signed-off-by: Johan Hovold <jhovold@gmail.com>

> ---

Ouch, I was sure I'd fixed that in the submitted v2.

/Johan


>  drivers/mfd/lm3533-core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mfd/lm3533-core.c b/drivers/mfd/lm3533-core.c
> index 75f4b7f..4a006c2 100644
> --- a/drivers/mfd/lm3533-core.c
> +++ b/drivers/mfd/lm3533-core.c
> @@ -128,7 +128,7 @@ int lm3533_update(struct lm3533 *lm3533, u8 reg, u8 val, u8 mask)
>  
>  	dev_dbg(lm3533->dev, "update [%02x]: %02x/%02x\n", reg, val, mask);
>  
> -	ret = regmap_update_bits(lm3533->regmap, reg, val, mask);
> +	ret = regmap_update_bits(lm3533->regmap, reg, mask, val);
>  	if (ret < 0) {
>  		dev_err(lm3533->dev, "failed to update register %02x: %d\n",
>  								reg, ret);

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

* Re: [PATCH] mfd: lm3533-core: Fix calling regmap_update_bits() with mask and val arguments swapped
  2012-05-10 15:49 ` Johan Hovold
@ 2012-05-11 13:36   ` Samuel Ortiz
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2012-05-11 13:36 UTC (permalink / raw)
  To: Johan Hovold; +Cc: Axel Lin, linux-kernel, Mark Brown

Hi Johan, Axel,

On Thu, May 10, 2012 at 05:49:25PM +0200, Johan Hovold wrote:
> On Thu, May 10, 2012 at 11:35:02PM +0800, Axel Lin wrote:
> > Current code calls regmap_update_bits() with mask and val arguments swapped.
> > Fix it.
> > 
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
> 
> Signed-off-by: Johan Hovold <jhovold@gmail.com>
Rather Acked-by.
I applied this patch.

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-05-11 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 15:35 [PATCH] mfd: lm3533-core: Fix calling regmap_update_bits() with mask and val arguments swapped Axel Lin
2012-05-10 15:49 ` Johan Hovold
2012-05-11 13:36   ` Samuel Ortiz

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