aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/extcon/extcon.c')
-rw-r--r--drivers/extcon/extcon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index a07addde297b..8dd0af1d50bc 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)
159static bool is_extcon_changed(u32 prev, u32 new, int idx, bool *attached) 159static bool is_extcon_changed(u32 prev, u32 new, int idx, bool *attached)
160{ 160{
161 if (((prev >> idx) & 0x1) != ((new >> idx) & 0x1)) { 161 if (((prev >> idx) & 0x1) != ((new >> idx) & 0x1)) {
162 *attached = new ? true : false; 162 *attached = ((new >> idx) & 0x1) ? true : false;
163 return true; 163 return true;
164 } 164 }
165 165