X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Finput%2Finput.c;h=73b17418a1b9ceeee5d5e1422fdbe67f17e100b6;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hp=41bb52187aef069d3348546c09f140b5d45afaa6;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/input/input.c b/drivers/input/input.c index 41bb52187..73b17418a 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -106,7 +106,7 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in } break; - + case EV_ABS: if (code > ABS_MAX || !test_bit(code, dev->absbit)) @@ -144,27 +144,27 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in 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: @@ -181,7 +181,7 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in break; } - if (type != EV_SYN) + if (type != EV_SYN) dev->sync = 0; if (dev->grab) @@ -282,11 +282,11 @@ static struct input_device_id *input_match_device(struct input_device_id *id, st 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; @@ -351,11 +351,11 @@ static void input_call_hotplug(char *verb, struct input_dev *dev) } 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"); @@ -381,17 +381,17 @@ static void input_call_hotplug(char *verb, struct input_dev *dev) 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); @@ -506,7 +506,7 @@ void input_register_handler(struct input_handler *handler) 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)))