aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/evdev.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2011-01-07 01:34:59 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-01-07 01:34:59 -0500
commit554738da71004d96e06fb75f4772dfc3b0f47810 (patch)
tree149a96ce3727025d3b9260961ec94ba8306db278 /drivers/input/evdev.c
parent7b4b30689d688d9ca2e5c3859db6bbe1c35e6014 (diff)
parenta6d38f889750ed6290728a19d9dad577b147c6d0 (diff)
Merge branch 'next' into for-linus
Conflicts: include/linux/input.h
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r--drivers/input/evdev.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 68f09a868434..c8471a2552e7 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -8,6 +8,8 @@
8 * the Free Software Foundation. 8 * the Free Software Foundation.
9 */ 9 */
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12
11#define EVDEV_MINOR_BASE 64 13#define EVDEV_MINOR_BASE 64
12#define EVDEV_MINORS 32 14#define EVDEV_MINORS 32
13#define EVDEV_MIN_BUFFER_SIZE 64U 15#define EVDEV_MIN_BUFFER_SIZE 64U
@@ -522,12 +524,11 @@ static int handle_eviocgbit(struct input_dev *dev,
522 if (type == EV_KEY && size == OLD_KEY_MAX) { 524 if (type == EV_KEY && size == OLD_KEY_MAX) {
523 len = OLD_KEY_MAX; 525 len = OLD_KEY_MAX;
524 if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000)) 526 if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000))
525 printk(KERN_WARNING 527 pr_warning("(EVIOCGBIT): Suspicious buffer size %u, "
526 "evdev.c(EVIOCGBIT): Suspicious buffer size %u, " 528 "limiting output to %zu bytes. See "
527 "limiting output to %zu bytes. See " 529 "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n",
528 "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n", 530 OLD_KEY_MAX,
529 OLD_KEY_MAX, 531 BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long));
530 BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long));
531 } 532 }
532 533
533 return bits_to_user(bits, len, size, p, compat_mode); 534 return bits_to_user(bits, len, size, p, compat_mode);
@@ -686,6 +687,10 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
686#define EVIOC_MASK_SIZE(nr) ((nr) & ~(_IOC_SIZEMASK << _IOC_SIZESHIFT)) 687#define EVIOC_MASK_SIZE(nr) ((nr) & ~(_IOC_SIZEMASK << _IOC_SIZESHIFT))
687 switch (EVIOC_MASK_SIZE(cmd)) { 688 switch (EVIOC_MASK_SIZE(cmd)) {
688 689
690 case EVIOCGPROP(0):
691 return bits_to_user(dev->propbit, INPUT_PROP_MAX,
692 size, p, compat_mode);
693
689 case EVIOCGKEY(0): 694 case EVIOCGKEY(0):
690 return bits_to_user(dev->key, KEY_MAX, size, p, compat_mode); 695 return bits_to_user(dev->key, KEY_MAX, size, p, compat_mode);
691 696
@@ -897,7 +902,7 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev,
897 break; 902 break;
898 903
899 if (minor == EVDEV_MINORS) { 904 if (minor == EVDEV_MINORS) {
900 printk(KERN_ERR "evdev: no more free evdev devices\n"); 905 pr_err("no more free evdev devices\n");
901 return -ENFILE; 906 return -ENFILE;
902 } 907 }
903 908