summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-22 18:56:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-22 18:56:13 +0300
commit50314035d6b1e9e07753162dd3be8df81b998086 (patch)
tree49eb3202f08bb1422f324405f73c435e38340591 /drivers
parentca1c4b745779e20711322b3338f3a942a3c1224a (diff)
parentf4513b065f7dbd37224226ef6e44b09eff742776 (diff)
downloadlinux-50314035d6b1e9e07753162dd3be8df81b998086.tar.xz
Merge tag 'extcon-fixes-for-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-linus
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.
Diffstat (limited to 'drivers')
-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)
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;
}