aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/evdev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-09 21:46:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-09 21:46:02 -0400
commitf4f9b8fc73f9aa93744f0e91e18f367d7766f523 (patch)
tree90d02c6722b0ffd8252ac438370600aaf8d814e7 /drivers/input/evdev.c
parent9894e6d9c020b754dd962960e9f7eac18282f69f (diff)
parenta292241cccb7e20e8b997a9a44177e7c98141859 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "A big update to the Atmel touchscreen driver, devm support for polled input devices, several drivers have been converted to using managed resources, and assorted driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (87 commits) Input: synaptics - fix resolution for manually provided min/max Input: atmel_mxt_ts - fix invalid return from mxt_get_bootloader_version Input: max8997_haptic - add error handling for regulator and pwm Input: elantech - don't set bit 1 of reg_10 when the no_hw_res quirk is set Input: elantech - deal with clickpads reporting right button events Input: edt-ft5x06 - fix an i2c write for M09 support Input: omap-keypad - remove platform data support ARM: OMAP2+: remove unused omap4-keypad file and code Input: ab8500-ponkey - switch to using managed resources Input: max8925_onkey - switch to using managed resources Input: 88pm860x-ts - switch to using managed resources Input: 88pm860x_onkey - switch to using managed resources Input: intel-mid-touch - switch to using managed resources Input: wacom - process outbound for newer Cintiqs Input: wacom - set stylus_in_proximity when pen is in range DTS: ARM: OMAP3-N900: Add tsc2005 support Input: tsc2005 - add DT support Input: add common DT binding for touchscreens Input: jornada680_kbd - switch top using managed resources Input: adp5520-keys - switch to using managed resources ...
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r--drivers/input/evdev.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index ce953d895f5b..fd325ec9f064 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -629,12 +629,10 @@ static int str_to_user(const char *str, unsigned int maxlen, void __user *p)
629 return copy_to_user(p, str, len) ? -EFAULT : len; 629 return copy_to_user(p, str, len) ? -EFAULT : len;
630} 630}
631 631
632#define OLD_KEY_MAX 0x1ff
633static int handle_eviocgbit(struct input_dev *dev, 632static int handle_eviocgbit(struct input_dev *dev,
634 unsigned int type, unsigned int size, 633 unsigned int type, unsigned int size,
635 void __user *p, int compat_mode) 634 void __user *p, int compat_mode)
636{ 635{
637 static unsigned long keymax_warn_time;
638 unsigned long *bits; 636 unsigned long *bits;
639 int len; 637 int len;
640 638
@@ -652,24 +650,8 @@ static int handle_eviocgbit(struct input_dev *dev,
652 default: return -EINVAL; 650 default: return -EINVAL;
653 } 651 }
654 652
655 /*
656 * Work around bugs in userspace programs that like to do
657 * EVIOCGBIT(EV_KEY, KEY_MAX) and not realize that 'len'
658 * should be in bytes, not in bits.
659 */
660 if (type == EV_KEY && size == OLD_KEY_MAX) {
661 len = OLD_KEY_MAX;
662 if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000))
663 pr_warning("(EVIOCGBIT): Suspicious buffer size %u, "
664 "limiting output to %zu bytes. See "
665 "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n",
666 OLD_KEY_MAX,
667 BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long));
668 }
669
670 return bits_to_user(bits, len, size, p, compat_mode); 653 return bits_to_user(bits, len, size, p, compat_mode);
671} 654}
672#undef OLD_KEY_MAX
673 655
674static int evdev_handle_get_keycode(struct input_dev *dev, void __user *p) 656static int evdev_handle_get_keycode(struct input_dev *dev, void __user *p)
675{ 657{