diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-10-06 00:36:38 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-10-06 00:36:38 (GMT) |
commit | 7b415285ae96f5bfa0fa95d3227c6900c4ff151d (patch) | |
tree | feb5198f57bfb5b58aca24ddc76a313236f94512 /drivers/input/joystick | |
parent | c65cf815653ec64e73d40819806c2d1aed91681e (diff) | |
parent | 049e6dde7e57f0054fdc49102e7ef4830c698b46 (diff) | |
download | linux-7b415285ae96f5bfa0fa95d3227c6900c4ff151d.tar.xz |
Merge tag 'v4.3-rc4' into next
Merge with mainline to sync up with changes to parkbd driver.
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/Kconfig | 1 | ||||
-rw-r--r-- | drivers/input/joystick/walkera0701.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig index 56eb471..4215b53 100644 --- a/drivers/input/joystick/Kconfig +++ b/drivers/input/joystick/Kconfig @@ -196,6 +196,7 @@ config JOYSTICK_TWIDJOY config JOYSTICK_ZHENHUA tristate "5-byte Zhenhua RC transmitter" select SERIO + select BITREVERSE help Say Y here if you have a Zhen Hua PPM-4CH transmitter which is supplied with a ready to fly micro electric indoor helicopters diff --git a/drivers/input/joystick/walkera0701.c b/drivers/input/joystick/walkera0701.c index 9c07fe9..d88f5dd 100644 --- a/drivers/input/joystick/walkera0701.c +++ b/drivers/input/joystick/walkera0701.c @@ -150,7 +150,7 @@ static void walkera0701_irq_handler(void *handler_data) if (w->counter == 24) { /* full frame */ walkera0701_parse_frame(w); w->counter = NO_SYNC; - if (abs(pulse_time - SYNC_PULSE) < RESERVE) /* new frame sync */ + if (abs64(pulse_time - SYNC_PULSE) < RESERVE) /* new frame sync */ w->counter = 0; } else { if ((pulse_time > (ANALOG_MIN_PULSE - RESERVE) @@ -161,7 +161,7 @@ static void walkera0701_irq_handler(void *handler_data) } else w->counter = NO_SYNC; } - } else if (abs(pulse_time - SYNC_PULSE - BIN0_PULSE) < + } else if (abs64(pulse_time - SYNC_PULSE - BIN0_PULSE) < RESERVE + BIN1_PULSE - BIN0_PULSE) /* frame sync .. */ w->counter = 0; |