diff options
| author | Sam Ravnborg <sam@ravnborg.org> | 2007-03-09 13:59:06 -0500 |
|---|---|---|
| committer | Sam Ravnborg <sam@ravnborg.org> | 2007-05-02 14:58:08 -0400 |
| commit | dc24f0e708c8a6a27b5b967a2599c04973054398 (patch) | |
| tree | 7c132c4f1cf17e7bda5705352dc9ad259ee74bf9 | |
| parent | 5a4910fbbeef14cc91daa41086449a1a4acebc96 (diff) | |
kbuild: remove dependency on input.h from file2alias
Almost all definitions used by file2alias was already
present in mod_devicetable.h.
Added the last definition and killed the input.h usage.
The errornous include was pointed out
by: Jan Engelhardt <jengelh@linux01.gwdg.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Deepak Saxena <dsaxena@plexity.net>
| -rw-r--r-- | include/linux/input.h | 4 | ||||
| -rw-r--r-- | include/linux/mod_devicetable.h | 1 | ||||
| -rw-r--r-- | scripts/mod/file2alias.c | 21 |
3 files changed, 16 insertions, 10 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index bde65c8a3519..13d510c3a5aa 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -1010,6 +1010,10 @@ struct input_dev { | |||
| 1010 | #error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match" | 1010 | #error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match" |
| 1011 | #endif | 1011 | #endif |
| 1012 | 1012 | ||
| 1013 | #if KEY_MIN_INTERESTING != INPUT_DEVICE_ID_KEY_MIN_INTERESTING | ||
| 1014 | #error "KEY_MIN_INTERESTING and INPUT_DEVICE_ID_KEY_MIN_INTERESTING do not match" | ||
| 1015 | #endif | ||
| 1016 | |||
| 1013 | #if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX | 1017 | #if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX |
| 1014 | #error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match" | 1018 | #error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match" |
| 1015 | #endif | 1019 | #endif |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index e96b2dee10bb..af04a555b52c 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -262,6 +262,7 @@ struct i2c_device_id { | |||
| 262 | 262 | ||
| 263 | /* Input */ | 263 | /* Input */ |
| 264 | #define INPUT_DEVICE_ID_EV_MAX 0x1f | 264 | #define INPUT_DEVICE_ID_EV_MAX 0x1f |
| 265 | #define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71 | ||
| 265 | #define INPUT_DEVICE_ID_KEY_MAX 0x1ff | 266 | #define INPUT_DEVICE_ID_KEY_MAX 0x1ff |
| 266 | #define INPUT_DEVICE_ID_REL_MAX 0x0f | 267 | #define INPUT_DEVICE_ID_REL_MAX 0x0f |
| 267 | #define INPUT_DEVICE_ID_ABS_MAX 0x3f | 268 | #define INPUT_DEVICE_ID_ABS_MAX 0x3f |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index b2f73ffb40bd..ed1244dd58d0 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
| @@ -37,7 +37,6 @@ typedef unsigned char __u8; | |||
| 37 | * even potentially has different endianness and word sizes, since | 37 | * even potentially has different endianness and word sizes, since |
| 38 | * we handle those differences explicitly below */ | 38 | * we handle those differences explicitly below */ |
| 39 | #include "../../include/linux/mod_devicetable.h" | 39 | #include "../../include/linux/mod_devicetable.h" |
| 40 | #include "../../include/linux/input.h" | ||
| 41 | 40 | ||
| 42 | #define ADD(str, sep, cond, field) \ | 41 | #define ADD(str, sep, cond, field) \ |
| 43 | do { \ | 42 | do { \ |
| @@ -416,31 +415,33 @@ static int do_input_entry(const char *filename, struct input_device_id *id, | |||
| 416 | 415 | ||
| 417 | sprintf(alias + strlen(alias), "-e*"); | 416 | sprintf(alias + strlen(alias), "-e*"); |
| 418 | if (id->flags & INPUT_DEVICE_ID_MATCH_EVBIT) | 417 | if (id->flags & INPUT_DEVICE_ID_MATCH_EVBIT) |
| 419 | do_input(alias, id->evbit, 0, EV_MAX); | 418 | do_input(alias, id->evbit, 0, INPUT_DEVICE_ID_EV_MAX); |
| 420 | sprintf(alias + strlen(alias), "k*"); | 419 | sprintf(alias + strlen(alias), "k*"); |
| 421 | if (id->flags & INPUT_DEVICE_ID_MATCH_KEYBIT) | 420 | if (id->flags & INPUT_DEVICE_ID_MATCH_KEYBIT) |
| 422 | do_input(alias, id->keybit, KEY_MIN_INTERESTING, KEY_MAX); | 421 | do_input(alias, id->keybit, |
| 422 | INPUT_DEVICE_ID_KEY_MIN_INTERESTING, | ||
| 423 | INPUT_DEVICE_ID_KEY_MAX); | ||
| 423 | sprintf(alias + strlen(alias), "r*"); | 424 | sprintf(alias + strlen(alias), "r*"); |
| 424 | if (id->flags & INPUT_DEVICE_ID_MATCH_RELBIT) | 425 | if (id->flags & INPUT_DEVICE_ID_MATCH_RELBIT) |
| 425 | do_input(alias, id->relbit, 0, REL_MAX); | 426 | do_input(alias, id->relbit, 0, INPUT_DEVICE_ID_REL_MAX); |
| 426 | sprintf(alias + strlen(alias), "a*"); | 427 | sprintf(alias + strlen(alias), "a*"); |
| 427 | if (id->flags & INPUT_DEVICE_ID_MATCH_ABSBIT) | 428 | if (id->flags & INPUT_DEVICE_ID_MATCH_ABSBIT) |
| 428 | do_input(alias, id->absbit, 0, ABS_MAX); | 429 | do_input(alias, id->absbit, 0, INPUT_DEVICE_ID_ABS_MAX); |
| 429 | sprintf(alias + strlen(alias), "m*"); | 430 | sprintf(alias + strlen(alias), "m*"); |
| 430 | if (id->flags & INPUT_DEVICE_ID_MATCH_MSCIT) | 431 | if (id->flags & INPUT_DEVICE_ID_MATCH_MSCIT) |
| 431 | do_input(alias, id->mscbit, 0, MSC_MAX); | 432 | do_input(alias, id->mscbit, 0, INPUT_DEVICE_ID_MSC_MAX); |
| 432 | sprintf(alias + strlen(alias), "l*"); | 433 | sprintf(alias + strlen(alias), "l*"); |
| 433 | if (id->flags & INPUT_DEVICE_ID_MATCH_LEDBIT) | 434 | if (id->flags & INPUT_DEVICE_ID_MATCH_LEDBIT) |
| 434 | do_input(alias, id->ledbit, 0, LED_MAX); | 435 | do_input(alias, id->ledbit, 0, INPUT_DEVICE_ID_LED_MAX); |
| 435 | sprintf(alias + strlen(alias), "s*"); | 436 | sprintf(alias + strlen(alias), "s*"); |
| 436 | if (id->flags & INPUT_DEVICE_ID_MATCH_SNDBIT) | 437 | if (id->flags & INPUT_DEVICE_ID_MATCH_SNDBIT) |
| 437 | do_input(alias, id->sndbit, 0, SND_MAX); | 438 | do_input(alias, id->sndbit, 0, INPUT_DEVICE_ID_SND_MAX); |
| 438 | sprintf(alias + strlen(alias), "f*"); | 439 | sprintf(alias + strlen(alias), "f*"); |
| 439 | if (id->flags & INPUT_DEVICE_ID_MATCH_FFBIT) | 440 | if (id->flags & INPUT_DEVICE_ID_MATCH_FFBIT) |
| 440 | do_input(alias, id->ffbit, 0, FF_MAX); | 441 | do_input(alias, id->ffbit, 0, INPUT_DEVICE_ID_FF_MAX); |
| 441 | sprintf(alias + strlen(alias), "w*"); | 442 | sprintf(alias + strlen(alias), "w*"); |
| 442 | if (id->flags & INPUT_DEVICE_ID_MATCH_SWBIT) | 443 | if (id->flags & INPUT_DEVICE_ID_MATCH_SWBIT) |
| 443 | do_input(alias, id->swbit, 0, SW_MAX); | 444 | do_input(alias, id->swbit, 0, INPUT_DEVICE_ID_SW_MAX); |
| 444 | return 1; | 445 | return 1; |
| 445 | } | 446 | } |
| 446 | 447 | ||
