summaryrefslogtreecommitdiff
path: root/drivers/input/joystick
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-10-06 03:36:38 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-10-06 03:36:38 +0300
commit7b415285ae96f5bfa0fa95d3227c6900c4ff151d (patch)
treefeb5198f57bfb5b58aca24ddc76a313236f94512 /drivers/input/joystick
parentc65cf815653ec64e73d40819806c2d1aed91681e (diff)
parent049e6dde7e57f0054fdc49102e7ef4830c698b46 (diff)
downloadlinux-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/Kconfig1
-rw-r--r--drivers/input/joystick/walkera0701.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
index 56eb471b5576..4215b5382092 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 9c07fe911075..d88f5dd3c9d9 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;