mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
drivers/media/IR/ir-keytable.c: fix binary search
The input-large-scancode patches changed the binary search in drivers/media/IR/ir-keytable.c to use unsigned integers, but signed integers are actually necessary for the algorithm to work. Signed-off-by: David Härdeman <[email protected]> Cc: Dmitry Torokhov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1792f17b72
commit
0d07025eff
1 changed files with 3 additions and 3 deletions
|
|
@ -325,9 +325,9 @@ static int ir_setkeytable(struct ir_input_dev *ir_dev,
|
|||
static unsigned int ir_lookup_by_scancode(const struct ir_scancode_table *rc_tab,
|
||||
unsigned int scancode)
|
||||
{
|
||||
unsigned int start = 0;
|
||||
unsigned int end = rc_tab->len - 1;
|
||||
unsigned int mid;
|
||||
int start = 0;
|
||||
int end = rc_tab->len - 1;
|
||||
int mid;
|
||||
|
||||
while (start <= end) {
|
||||
mid = (start + end) / 2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue