diff options
-rw-r--r-- | scripts/mod/file2alias.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index f61c9ccef6aa..717b04a3b40a 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -452,6 +452,24 @@ static int do_eisa_entry(const char *filename, struct eisa_device_id *eisa, | |||
452 | return 1; | 452 | return 1; |
453 | } | 453 | } |
454 | 454 | ||
455 | /* Looks like: parisc:tNhvNrevNsvN */ | ||
456 | static int do_parisc_entry(const char *filename, struct parisc_device_id *id, | ||
457 | char *alias) | ||
458 | { | ||
459 | id->hw_type = TO_NATIVE(id->hw_type); | ||
460 | id->hversion = TO_NATIVE(id->hversion); | ||
461 | id->hversion_rev = TO_NATIVE(id->hversion_rev); | ||
462 | id->sversion = TO_NATIVE(id->sversion); | ||
463 | |||
464 | strcpy(alias, "parisc:"); | ||
465 | ADD(alias, "t", id->hw_type != HWTYPE_ANY_ID, id->hw_type); | ||
466 | ADD(alias, "hv", id->hversion != HVERSION_ANY_ID, id->hversion); | ||
467 | ADD(alias, "rev", id->hversion_rev != HVERSION_REV_ANY_ID, id->hversion_rev); | ||
468 | ADD(alias, "sv", id->sversion != SVERSION_ANY_ID, id->sversion); | ||
469 | |||
470 | return 1; | ||
471 | } | ||
472 | |||
455 | /* Ignore any prefix, eg. v850 prepends _ */ | 473 | /* Ignore any prefix, eg. v850 prepends _ */ |
456 | static inline int sym_is(const char *symbol, const char *name) | 474 | static inline int sym_is(const char *symbol, const char *name) |
457 | { | 475 | { |
@@ -559,6 +577,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
559 | do_table(symval, sym->st_size, | 577 | do_table(symval, sym->st_size, |
560 | sizeof(struct eisa_device_id), "eisa", | 578 | sizeof(struct eisa_device_id), "eisa", |
561 | do_eisa_entry, mod); | 579 | do_eisa_entry, mod); |
580 | else if (sym_is(symname, "__mod_parisc_device_table")) | ||
581 | do_table(symval, sym->st_size, | ||
582 | sizeof(struct parisc_device_id), "parisc", | ||
583 | do_parisc_entry, mod); | ||
562 | } | 584 | } |
563 | 585 | ||
564 | /* Now add out buffered information to the generated C source */ | 586 | /* Now add out buffered information to the generated C source */ |