All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hennerich, Michael" <Michael.Hennerich@analog.com>
To: "axel.lin@gmail.com" <axel.lin@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Richard Purdie <rpurdie@rpsys.net>,
	"device-drivers-devel@blackfin.uclinux.org" 
	<device-drivers-devel@blackfin.uclinux.org>
Subject: RE: [PATCH] backlight: Fix the logic to set bits in adp8860_bl and adp8870_bl drivers
Date: Mon, 16 Jan 2012 08:33:38 +0000	[thread overview]
Message-ID: <544AC56F16B56944AEC3BD4E3D59177148736CE09D@LIMKCMBX1.ad.analog.com> (raw)
In-Reply-To: <CAF+7xW=qATBpVy-wG6+Joq+LB19TmM6qJUxoOV0U7R8omLVrxw@mail.gmail.com>

Axel Lin wrote on 2012-01-14:
>>> diff --git a/drivers/video/backlight/adp8860_bl.c
>>> b/drivers/video/backlight/adp8860_bl.c index 66bc74d..378276c 100644
>>> --- a/drivers/video/backlight/adp8860_bl.c +++
>>> b/drivers/video/backlight/adp8860_bl.c @@ -146,7 +146,7 @@ static int
>>> adp8860_set_bits(struct i2c_client *client, int reg, uint8_t bit_mask
>>>
>>>       ret = adp8860_read(client, reg, &reg_val);
>>>
>>> -     if (!ret && ((reg_val & bit_mask) == 0)) { +     if (!ret &&
>>> ((reg_val & bit_mask) != bit_mask)) {               reg_val |=
>>> bit_mask;               ret = adp8860_write(client, reg, reg_val);
>>>   } diff --git a/drivers/video/backlight/adp8870_bl.c
>>> b/drivers/video/backlight/adp8870_bl.c index 6c68a68..6735059 100644
>>> --- a/drivers/video/backlight/adp8870_bl.c +++
>>> b/drivers/video/backlight/adp8870_bl.c @@ -160,7 +160,7 @@ static int
>>> adp8870_set_bits(struct i2c_client *client, int reg, uint8_t bit_mask
>>>
>>>       ret = adp8870_read(client, reg, &reg_val);
>>>
>>> -     if (!ret && ((reg_val & bit_mask) == 0)) {
>>> +     if (!ret && ((reg_val & bit_mask) != bit_mask)) {
>>>               reg_val |= bit_mask;
>>>               ret = adp8870_write(client, reg, reg_val);
>>>       }
>>
>> This patch is applicable to 3.2.x, but I don't know whether to route it
>> to -stable becasue you didn't tell me what effect the patch has :(
>>
>
> It's because I don't have this hardware.
> I just found the bug while reading the code.
>
> I was thinking I should CC stable, but since the code is there for a
> long time
> and I don't know any complains of the bug. So I didn't CC stable.
>
> Michael, do you see any user-visible effects of the bug?

No - This fixes a bug. The code seemed to be working before,
only by accident.


Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif




      reply	other threads:[~2012-01-16  8:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13  8:15 [PATCH] backlight: Fix the logic to set bits in adp8860_bl and adp8870_bl drivers Axel Lin
2012-01-13 22:10 ` Andrew Morton
2012-01-14  9:22   ` Axel Lin
2012-01-16  8:33     ` Hennerich, Michael [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=544AC56F16B56944AEC3BD4E3D59177148736CE09D@LIMKCMBX1.ad.analog.com \
    --to=michael.hennerich@analog.com \
    --cc=akpm@linux-foundation.org \
    --cc=axel.lin@gmail.com \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.