]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'extcon-fixes-for-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Sep 2015 15:56:13 +0000 (08:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Sep 2015 15:56:13 +0000 (08:56 -0700)
Chanwoo writes:

Update extcon for v4.3-rc3

This patches fix the following one issue:
- Fix bug of the is_extcon_changed() which check whether specific cable is
  attached or detached.

drivers/extcon/extcon.c

index a07addde297be4576a9306d170feb5e9b910a6d8..8dd0af1d50bc4e544b167555c828ed9ec5e716e2 100644 (file)
@@ -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;
        }