linux-stable/drivers/input
Elias Vanderstuyft fc7392aa1b Input: don't modify the id of ioctl-provided ff effect on upload failure
If a new (id == -1) ff effect was uploaded from userspace,
ff-core.c::input_ff_upload() will have assigned a positive number to the
new effect id.  Currently, evdev.c::evdev_do_ioctl() will save this new id
to userspace, regardless of whether the upload succeeded or not.

On upload failure, this can be confusing because the dev->ff->effects[]
array will not contain an element at the index of that new effect id.

This patch fixes this by leaving the id unchanged after upload fails.

Note: Unfortunately applications should still expect changed effect id for
quite some time.

This has been discussed on:
http://www.mail-archive.com/linux-input@vger.kernel.org/msg08513.html
("ff-core effect id handling in case of a failed effect upload")

Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Elias Vanderstuyft <elias.vds@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-29 12:13:09 -07:00
..
gameport Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
joystick Merge branch 'next' into for-linus 2014-01-23 08:10:44 -08:00
keyboard Input: adp5588-keys - get value from data out when dir is out 2014-02-15 13:13:17 -08:00
misc Input: da9052_onkey - use correct register bit for key status 2014-02-17 11:29:01 -08:00
mouse Input: synaptics - add manual min/max quirk for ThinkPad X240 2014-03-28 09:02:01 -07:00
serio Input: hyperv-keyboard - pass through 0xE1 prefix 2014-01-12 11:41:56 -08:00
tablet Input: wacom - add support for DTU-1031 2014-01-20 20:36:57 -08:00
touchscreen Merge branch 'next' into for-linus 2014-01-23 08:10:44 -08:00
apm-power.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
evbug.c
evdev.c Input: don't modify the id of ioctl-provided ff effect on upload failure 2014-03-29 12:13:09 -07:00
ff-core.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
ff-memless.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
input-compat.c compat: Use COMPAT_USE_64BIT_TIME in the input subsystem 2012-02-20 12:48:47 -08:00
input-compat.h compat: Use COMPAT_USE_64BIT_TIME in the input subsystem 2012-02-20 12:48:47 -08:00
input-mt.c Input: MT - handle semi-mt devices in core 2013-04-07 21:02:32 -07:00
input-polldev.c Merge commit 'v3.2-rc3' into next 2011-11-29 01:51:07 -08:00
input.c Merge branch 'next' into for-linus 2014-01-23 08:10:44 -08:00
joydev.c Input: fix use-after-free introduced with dynamic minor changes 2012-10-22 08:50:37 +03:00
Kconfig Input: mousedev - allow disabling even without CONFIG_EXPERT 2013-10-31 08:46:07 -07:00
Makefile Input: matrix-keymap - uninline and prepare for device tree support 2012-05-10 22:38:47 -07:00
matrix-keymap.c input: Export matrix_keypad_parse_of_params() 2013-04-19 00:31:13 +02:00
mousedev.c Input: mousedev - move /dev/input/mice to the correct minor 2012-11-18 23:15:16 -08:00
sparse-keymap.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00