diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:39:55 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:39:55 -0400 |
commit | c324b44c34050cf2a9b58830e11c974806bd85d8 (patch) | |
tree | 3ac45a783221283925cd698334a8f5e7dd4c1df8 /drivers/input/input.c | |
parent | 2fcf522509cceea524b6e7ece8fd6759b682175a (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index a275211c8e1e..88636a204525 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -89,6 +89,15 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in | |||
89 | 89 | ||
90 | break; | 90 | break; |
91 | 91 | ||
92 | case EV_SW: | ||
93 | |||
94 | if (code > SW_MAX || !test_bit(code, dev->swbit) || !!test_bit(code, dev->sw) == value) | ||
95 | return; | ||
96 | |||
97 | change_bit(code, dev->sw); | ||
98 | |||
99 | break; | ||
100 | |||
92 | case EV_ABS: | 101 | case EV_ABS: |
93 | 102 | ||
94 | if (code > ABS_MAX || !test_bit(code, dev->absbit)) | 103 | if (code > ABS_MAX || !test_bit(code, dev->absbit)) |
@@ -402,6 +411,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev) | |||
402 | SPRINTF_BIT_A2(ledbit, "LED=", LED_MAX, EV_LED); | 411 | SPRINTF_BIT_A2(ledbit, "LED=", LED_MAX, EV_LED); |
403 | SPRINTF_BIT_A2(sndbit, "SND=", SND_MAX, EV_SND); | 412 | SPRINTF_BIT_A2(sndbit, "SND=", SND_MAX, EV_SND); |
404 | SPRINTF_BIT_A2(ffbit, "FF=", FF_MAX, EV_FF); | 413 | SPRINTF_BIT_A2(ffbit, "FF=", FF_MAX, EV_FF); |
414 | SPRINTF_BIT_A2(swbit, "SW=", SW_MAX, EV_SW); | ||
405 | 415 | ||
406 | envp[i++] = NULL; | 416 | envp[i++] = NULL; |
407 | 417 | ||
@@ -490,6 +500,7 @@ static int input_devices_read(char *buf, char **start, off_t pos, int count, int | |||
490 | SPRINTF_BIT_B2(ledbit, "LED=", LED_MAX, EV_LED); | 500 | SPRINTF_BIT_B2(ledbit, "LED=", LED_MAX, EV_LED); |
491 | SPRINTF_BIT_B2(sndbit, "SND=", SND_MAX, EV_SND); | 501 | SPRINTF_BIT_B2(sndbit, "SND=", SND_MAX, EV_SND); |
492 | SPRINTF_BIT_B2(ffbit, "FF=", FF_MAX, EV_FF); | 502 | SPRINTF_BIT_B2(ffbit, "FF=", FF_MAX, EV_FF); |
503 | SPRINTF_BIT_B2(swbit, "SW=", SW_MAX, EV_SW); | ||
493 | 504 | ||
494 | len += sprintf(buf + len, "\n"); | 505 | len += sprintf(buf + len, "\n"); |
495 | 506 | ||