summaryrefslogtreecommitdiffstats
path: root/block/ioprio.c
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2015-07-07 15:06:15 +0200
committerChanwoo Choi <cw00.choi@samsung.com>2015-07-31 03:08:47 +0200
commitbe052cc87745e01846fb036eb81567c784439078 (patch)
treea730360e39f24ab9b75fb930eecc615d21e0baca /block/ioprio.c
parentextcon: palmas: Fix NULL pointer error (diff)
downloadlinux-be052cc87745e01846fb036eb81567c784439078.tar.xz
linux-be052cc87745e01846fb036eb81567c784439078.zip
extcon: Fix hang and extcon_get/set_cable_state().
Users of find_cable_index_by_name() will cause a kernel hang as the while loop counter is never incremented and end condition is never reached. extcon_get_cable_state() and extcon_set_cable_state() are broken because they use cable index instead of cable id. This causes the first cable state (cable.0) to be always invalid in sysfs or extcon_get_cable_state() users. Introduce a new function find_cable_id_by_name() that fixes both of the above issues. Fixes: commit 73b6ecdb93e8 ("extcon: Redefine the unique id of supported external connectors without 'enum extcon' type") Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Roger Quadros <rogerq@ti.com> Tested-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> [cw00.choi: Fix minor coding style] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'block/ioprio.c')
0 files changed, 0 insertions, 0 deletions