summaryrefslogtreecommitdiff
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-27 21:30:41 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-27 21:30:41 (GMT)
commitd85486d47123961bd8b08e94f6d4886c59a1fd76 (patch)
tree8bfcebed0fd1753fa8f0fa85286551b80e8ed7d1 /drivers/input/input.c
parent66304207cd341045df34195b4a8d422075bff513 (diff)
parent0808882863774ab69066d83f49f511606be024e0 (diff)
downloadlinux-d85486d47123961bd8b08e94f6d4886c59a1fd76.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "Updates for the input subsystem. This contains the following new drivers promised in the last merge window: - driver for touchscreen controller found in Surface 3 - driver for Pegasus Notetaker tablet - driver for Atmel Captouch Buttons - driver for Raydium I2C touchscreen controllers - powerkey driver for HISI 65xx SoC plus a few fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits) Input: tty/vt/keyboard - use memdup_user() Input: pegasus_notetaker - set device mode in reset_resume() if in use Input: pegasus_notetaker - cancel workqueue's work in suspend() Input: pegasus_notetaker - fix usb_autopm calls to be balanced Input: pegasus_notetaker - handle usb control msg errors Input: wacom_w8001 - handle errors from input_mt_init_slots() Input: wacom_w8001 - resolution wasn't set for ABS_MT_POSITION_X/Y Input: pixcir_ts - add support for axis inversion / swapping Input: icn8318 - use of_touchscreen helpers for inverting / swapping axes Input: edt-ft5x06 - add support for inverting / swapping axes Input: of_touchscreen - add support for inverted / swapped axes Input: synaptics-rmi4 - use the RMI_F11_REL_BYTES define in rmi_f11_rel_pos_report Input: synaptics-rmi4 - remove unneeded variable Input: synaptics-rmi4 - remove pointer to rmi_function in f12_data Input: synaptics-rmi4 - support regulator supplies Input: raydium_i2c_ts - check CRC of incoming packets Input: xen-kbdfront - prefer xenbus_write() over xenbus_printf() where possible Input: fix a double word "is is" in include/linux/input.h Input: add powerkey driver for HISI 65xx SoC Input: apanel - spelling mistake - "skiping" -> "skipping" ...
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index b87ffbd..d95c34e 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -153,8 +153,6 @@ static void input_pass_values(struct input_dev *dev,
rcu_read_unlock();
- add_input_randomness(vals->type, vals->code, vals->value);
-
/* trigger auto repeat for key events */
if (test_bit(EV_REP, dev->evbit) && test_bit(EV_KEY, dev->evbit)) {
for (v = vals; v != vals + count; v++) {
@@ -371,9 +369,10 @@ static int input_get_disposition(struct input_dev *dev,
static void input_handle_event(struct input_dev *dev,
unsigned int type, unsigned int code, int value)
{
- int disposition;
+ int disposition = input_get_disposition(dev, type, code, &value);
- disposition = input_get_disposition(dev, type, code, &value);
+ if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
+ add_input_randomness(type, code, value);
if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
dev->event(dev, type, code, value);