aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/input.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 935a1835de2d..8ff92aa13a0a 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -29,6 +29,14 @@ MODULE_LICENSE("GPL");
29 29
30#define INPUT_DEVICES 256 30#define INPUT_DEVICES 256
31 31
32/*
33 * EV_ABS events which should not be cached are listed here.
34 */
35static unsigned int input_abs_bypass_init_data[] __initdata = {
36 0
37};
38static unsigned long input_abs_bypass[BITS_TO_LONGS(ABS_CNT)];
39
32static LIST_HEAD(input_dev_list); 40static LIST_HEAD(input_dev_list);
33static LIST_HEAD(input_handler_list); 41static LIST_HEAD(input_handler_list);
34 42
@@ -192,6 +200,11 @@ static void input_handle_event(struct input_dev *dev,
192 case EV_ABS: 200 case EV_ABS:
193 if (is_event_supported(code, dev->absbit, ABS_MAX)) { 201 if (is_event_supported(code, dev->absbit, ABS_MAX)) {
194 202
203 if (test_bit(code, input_abs_bypass)) {
204 disposition = INPUT_PASS_TO_HANDLERS;
205 break;
206 }
207
195 value = input_defuzz_abs_event(value, 208 value = input_defuzz_abs_event(value,
196 dev->abs[code], dev->absfuzz[code]); 209 dev->abs[code], dev->absfuzz[code]);
197 210
@@ -1634,10 +1647,20 @@ static const struct file_operations input_fops = {
1634 .open = input_open_file, 1647 .open = input_open_file,
1635}; 1648};
1636 1649
1650static void __init input_init_abs_bypass(void)
1651{
1652 const unsigned int *p;
1653
1654 for (p = input_abs_bypass_init_data; *p; p++)
1655 input_abs_bypass[BIT_WORD(*p)] |= BIT_MASK(*p);
1656}
1657
1637static int __init input_init(void) 1658static int __init input_init(void)
1638{ 1659{
1639 int err; 1660 int err;
1640 1661
1662 input_init_abs_bypass();
1663
1641 err = class_register(&input_class); 1664 err = class_register(&input_class);
1642 if (err) { 1665 if (err) {
1643 printk(KERN_ERR "input: unable to register input_dev class\n"); 1666 printk(KERN_ERR "input: unable to register input_dev class\n");