Patch "extcon: Fix attached value returned by is_extcon_changed" has been added to the 4.2-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
extcon: Fix attached value returned by is_extcon_changed
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
extcon-fix-attached-value-returned-by-is_extcon_changed.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
f4513b065f7dbd37224226ef6e44b09eff742776Mon Sep 17 00:00:00 2001
From: Hans de Goede <[email protected]>
Date: Mon, 24 Aug 2015 00:35:36 +0200
Subject: extcon: Fix attached value returned by is_extcon_changed
From: Hans de Goede <[email protected]>
commit f4513b065f7dbd37224226ef6e44b09eff742776 upstream.
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.
--- drivers/extcon/extcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon.c +1 -1
@@ -159,7 +159,7 @@ static int find_cable_index_by_name(strustatic 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; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.2/extcon-fix-attached-value-returned-by-is_extcon_changed.patch