diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-07-25 05:37:07 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-07-25 05:37:07 -0400 |
| commit | 0e2f65ee30eee2db054f7fd73f462c5da33ec963 (patch) | |
| tree | 26c61eb7745da0c0d9135e9d12088f570cb8530d /scripts/mod/file2alias.c | |
| parent | da7878d75b8520c9ae00d27dfbbce546a7bfdfbb (diff) | |
| parent | fb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 (diff) | |
Merge branch 'linus' into x86/pebs
Conflicts:
arch/x86/Kconfig.cpu
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/setup_64.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts/mod/file2alias.c')
| -rw-r--r-- | scripts/mod/file2alias.c | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index cea4a790e1e9..4fa1f3ad2513 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
| @@ -304,6 +304,14 @@ static int do_ap_entry(const char *filename, | |||
| 304 | return 1; | 304 | return 1; |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | /* looks like: "css:tN" */ | ||
| 308 | static int do_css_entry(const char *filename, | ||
| 309 | struct css_device_id *id, char *alias) | ||
| 310 | { | ||
| 311 | sprintf(alias, "css:t%01X", id->type); | ||
| 312 | return 1; | ||
| 313 | } | ||
| 314 | |||
| 307 | /* Looks like: "serio:tyNprNidNexN" */ | 315 | /* Looks like: "serio:tyNprNidNexN" */ |
| 308 | static int do_serio_entry(const char *filename, | 316 | static int do_serio_entry(const char *filename, |
| 309 | struct serio_device_id *id, char *alias) | 317 | struct serio_device_id *id, char *alias) |
| @@ -332,11 +340,18 @@ static int do_acpi_entry(const char *filename, | |||
| 332 | } | 340 | } |
| 333 | 341 | ||
| 334 | /* looks like: "pnp:dD" */ | 342 | /* looks like: "pnp:dD" */ |
| 335 | static int do_pnp_entry(const char *filename, | 343 | static void do_pnp_device_entry(void *symval, unsigned long size, |
| 336 | struct pnp_device_id *id, char *alias) | 344 | struct module *mod) |
| 337 | { | 345 | { |
| 338 | sprintf(alias, "pnp:d%s*", id->id); | 346 | const unsigned long id_size = sizeof(struct pnp_device_id); |
| 339 | return 1; | 347 | const struct pnp_device_id *id = symval; |
| 348 | |||
| 349 | device_id_check(mod->name, "pnp", size, id_size, symval); | ||
| 350 | |||
| 351 | buf_printf(&mod->dev_table_buf, | ||
| 352 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id->id); | ||
| 353 | buf_printf(&mod->dev_table_buf, | ||
| 354 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", id->id); | ||
| 340 | } | 355 | } |
| 341 | 356 | ||
| 342 | /* looks like: "pnp:dD" for every device of the card */ | 357 | /* looks like: "pnp:dD" for every device of the card */ |
| @@ -380,9 +395,12 @@ static void do_pnp_card_entries(void *symval, unsigned long size, | |||
| 380 | } | 395 | } |
| 381 | 396 | ||
| 382 | /* add an individual alias for every device entry */ | 397 | /* add an individual alias for every device entry */ |
| 383 | if (!dup) | 398 | if (!dup) { |
| 384 | buf_printf(&mod->dev_table_buf, | 399 | buf_printf(&mod->dev_table_buf, |
| 385 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); | 400 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); |
| 401 | buf_printf(&mod->dev_table_buf, | ||
| 402 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", id); | ||
| 403 | } | ||
| 386 | } | 404 | } |
| 387 | } | 405 | } |
| 388 | } | 406 | } |
| @@ -605,7 +623,7 @@ static int do_i2c_entry(const char *filename, struct i2c_device_id *id, | |||
| 605 | return 1; | 623 | return 1; |
| 606 | } | 624 | } |
| 607 | 625 | ||
| 608 | /* Ignore any prefix, eg. v850 prepends _ */ | 626 | /* Ignore any prefix, eg. some architectures prepend _ */ |
| 609 | static inline int sym_is(const char *symbol, const char *name) | 627 | static inline int sym_is(const char *symbol, const char *name) |
| 610 | { | 628 | { |
| 611 | const char *match; | 629 | const char *match; |
| @@ -680,6 +698,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
| 680 | do_table(symval, sym->st_size, | 698 | do_table(symval, sym->st_size, |
| 681 | sizeof(struct ap_device_id), "ap", | 699 | sizeof(struct ap_device_id), "ap", |
| 682 | do_ap_entry, mod); | 700 | do_ap_entry, mod); |
| 701 | else if (sym_is(symname, "__mod_css_device_table")) | ||
| 702 | do_table(symval, sym->st_size, | ||
| 703 | sizeof(struct css_device_id), "css", | ||
| 704 | do_css_entry, mod); | ||
| 683 | else if (sym_is(symname, "__mod_serio_device_table")) | 705 | else if (sym_is(symname, "__mod_serio_device_table")) |
| 684 | do_table(symval, sym->st_size, | 706 | do_table(symval, sym->st_size, |
| 685 | sizeof(struct serio_device_id), "serio", | 707 | sizeof(struct serio_device_id), "serio", |
| @@ -689,9 +711,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
| 689 | sizeof(struct acpi_device_id), "acpi", | 711 | sizeof(struct acpi_device_id), "acpi", |
| 690 | do_acpi_entry, mod); | 712 | do_acpi_entry, mod); |
| 691 | else if (sym_is(symname, "__mod_pnp_device_table")) | 713 | else if (sym_is(symname, "__mod_pnp_device_table")) |
| 692 | do_table(symval, sym->st_size, | 714 | do_pnp_device_entry(symval, sym->st_size, mod); |
| 693 | sizeof(struct pnp_device_id), "pnp", | ||
| 694 | do_pnp_entry, mod); | ||
| 695 | else if (sym_is(symname, "__mod_pnp_card_device_table")) | 715 | else if (sym_is(symname, "__mod_pnp_card_device_table")) |
| 696 | do_pnp_card_entries(symval, sym->st_size, mod); | 716 | do_pnp_card_entries(symval, sym->st_size, mod); |
| 697 | else if (sym_is(symname, "__mod_pcmcia_device_table")) | 717 | else if (sym_is(symname, "__mod_pcmcia_device_table")) |
