Merge tag 'md/4.3-rc4-fix' of git://neil.brown.name/md
[linux-drm-fsl-dcu.git] / 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;
        }