diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-22 08:56:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-22 08:56:13 -0700 |
commit | 50314035d6b1e9e07753162dd3be8df81b998086 (patch) | |
tree | 49eb3202f08bb1422f324405f73c435e38340591 /drivers | |
parent | ca1c4b745779e20711322b3338f3a942a3c1224a (diff) | |
parent | f4513b065f7dbd37224226ef6e44b09eff742776 (diff) |
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.c | 2 |
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; } |