diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-22 17:56:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-22 17:56:13 +0200 |
commit | 50314035d6b1e9e07753162dd3be8df81b998086 (patch) | |
tree | 49eb3202f08bb1422f324405f73c435e38340591 /drivers/extcon/extcon.c | |
parent | Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc (diff) | |
parent | extcon: Fix attached value returned by is_extcon_changed (diff) | |
download | linux-50314035d6b1e9e07753162dd3be8df81b998086.tar.xz linux-50314035d6b1e9e07753162dd3be8df81b998086.zip |
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/extcon/extcon.c')
-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; } |