}
break;
-
+
case EV_ABS:
if (code > ABS_MAX || !test_bit(code, dev->absbit))
if (code > MSC_MAX || !test_bit(code, dev->mscbit))
return;
- if (dev->event) dev->event(dev, type, code, value);
-
+ if (dev->event) dev->event(dev, type, code, value);
+
break;
case EV_LED:
-
+
if (code > LED_MAX || !test_bit(code, dev->ledbit) || !!test_bit(code, dev->led) == value)
return;
change_bit(code, dev->led);
- if (dev->event) dev->event(dev, type, code, value);
-
+ if (dev->event) dev->event(dev, type, code, value);
+
break;
case EV_SND:
-
+
if (code > SND_MAX || !test_bit(code, dev->sndbit))
return;
- if (dev->event) dev->event(dev, type, code, value);
-
+ if (dev->event) dev->event(dev, type, code, value);
+
break;
case EV_REP:
break;
}
- if (type != EV_SYN)
+ if (type != EV_SYN)
dev->sync = 0;
if (dev->grab)
if (id->flags & INPUT_DEVICE_ID_MATCH_VENDOR)
if (id->id.vendor != dev->id.vendor)
continue;
-
+
if (id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT)
if (id->id.product != dev->id.product)
continue;
-
+
if (id->flags & INPUT_DEVICE_ID_MATCH_VERSION)
if (id->id.version != dev->id.version)
continue;
}
if (in_interrupt()) {
printk(KERN_ERR "input.c: calling hotplug from interrupt\n");
- return;
+ return;
}
if (!current->fs->root) {
printk(KERN_WARNING "input.c: calling hotplug without valid filesystem\n");
- return;
+ return;
}
if (!(envp = (char **) kmalloc(20 * sizeof(char *), GFP_KERNEL))) {
printk(KERN_ERR "input.c: not enough memory allocating hotplug environment\n");
envp[i++] = scratch;
scratch += sprintf(scratch, "PRODUCT=%x/%x/%x/%x",
- dev->id.bustype, dev->id.vendor, dev->id.product, dev->id.version) + 1;
-
+ dev->id.bustype, dev->id.vendor, dev->id.product, dev->id.version) + 1;
+
if (dev->name) {
envp[i++] = scratch;
- scratch += sprintf(scratch, "NAME=%s", dev->name) + 1;
+ scratch += sprintf(scratch, "NAME=%s", dev->name) + 1;
}
if (dev->phys) {
envp[i++] = scratch;
- scratch += sprintf(scratch, "PHYS=%s", dev->phys) + 1;
- }
+ scratch += sprintf(scratch, "PHYS=%s", dev->phys) + 1;
+ }
SPRINTF_BIT_A(evbit, "EV=", EV_MAX);
SPRINTF_BIT_A2(keybit, "KEY=", KEY_MAX, EV_KEY);
input_table[handler->minor >> 5] = handler;
list_add_tail(&handler->node, &input_handler_list);
-
+
list_for_each_entry(dev, &input_dev_list, node)
if (!handler->blacklist || !input_match_device(handler->blacklist, dev))
if ((id = input_match_device(handler->id_table, dev)))