public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: cw00.choi@samsung•com (Chanwoo Choi)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH resend] extcon: Fix attached value returned by is_extcon_changed
Date: Tue, 22 Sep 2015 10:44:48 +0900	[thread overview]
Message-ID: <5600B290.9090502@samsung.com> (raw)
In-Reply-To: <55FFEA1F.7050500@redhat.com>

Hi,

On 2015? 09? 21? 20:29, Hans de Goede wrote:
> Hi,
> 
> On 21-09-15 03:36, Chanwoo Choi wrote:
>> On 2015? 09? 20? 21:34, Hans de Goede wrote:
>>> is_extcon_changed should only check the idx-th bit of new, not
>>> the entirety of new when setting attached.
>>>
>>> This fixes extcon sending notifications that a cable was inserted when
>>> it gets removed while another cable is still connected.
>>>
>>> Cc: stable at vger.kernel.org
>>> Signed-off-by: Hans de Goede <hdegoede@redhat•com>
>>> ---
>>>   drivers/extcon/extcon.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
>>> index a07addd..8dd0af1 100644
>>> --- a/drivers/extcon/extcon.c
>>> +++ b/drivers/extcon/extcon.c
>>> @@ -159,7 +159,7 @@ static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
>>>   static bool is_extcon_changed(u32 prev, u32 new, int idx, bool *attached)
>>>   {
>>>       if (((prev >> idx) & 0x1) != ((new >> idx) & 0x1)) {
>>> -        *attached = new ? true : false;
>>> +        *attached = ((new >> idx) & 0x1) ? true : false;
>>>           return true;
>>>       }
>>>
>>>
>>
>> This patch was already applied[1].
>> [1] https://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/log/?h=extcon-next
> 
> Yet it is not in 4.3-rc1, applying the patch to your tree is not useful
> unless you also send a pull-req to get the changes in your tree actually
> merged ...

No. It is useful step. It is first step to send pull-request for including the main tree.
I'll send pull-request before releasing official version.

Thanks,
Chanwoo Choi

  reply	other threads:[~2015-09-22  1:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-20 12:34 [PATCH resend] extcon: Fix attached value returned by is_extcon_changed Hans de Goede
2015-09-20 12:34 ` Hans de Goede
2015-09-21  1:36   ` Chanwoo Choi
2015-09-21 11:29     ` Hans de Goede
2015-09-22  1:44       ` Chanwoo Choi [this message]
2015-09-22  7:12         ` Hans de Goede
2015-09-22  7:54           ` Chanwoo Choi

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=5600B290.9090502@samsung.com \
    --to=cw00.choi@samsung$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox