patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / drivers / input / input.c
index 41bb521..73b1741 100644 (file)
@@ -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)))