aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/file2alias.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 8a09021d8c59..895ba3ac6208 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -484,6 +484,21 @@ static int do_parisc_entry(const char *filename, struct parisc_device_id *id,
484 return 1; 484 return 1;
485} 485}
486 486
487/* Looks like: ssb:vNidNrevN. */
488static int do_ssb_entry(const char *filename,
489 struct ssb_device_id *id, char *alias)
490{
491 id->vendor = TO_NATIVE(id->vendor);
492 id->coreid = TO_NATIVE(id->coreid);
493 id->revision = TO_NATIVE(id->revision);
494
495 strcpy(alias, "ssb:");
496 ADD(alias, "v", id->vendor != SSB_ANY_VENDOR, id->vendor);
497 ADD(alias, "id", id->coreid != SSB_ANY_ID, id->coreid);
498 ADD(alias, "rev", id->revision != SSB_ANY_REV, id->revision);
499 return 1;
500}
501
487/* Ignore any prefix, eg. v850 prepends _ */ 502/* Ignore any prefix, eg. v850 prepends _ */
488static inline int sym_is(const char *symbol, const char *name) 503static inline int sym_is(const char *symbol, const char *name)
489{ 504{
@@ -599,6 +614,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
599 do_table(symval, sym->st_size, 614 do_table(symval, sym->st_size,
600 sizeof(struct parisc_device_id), "parisc", 615 sizeof(struct parisc_device_id), "parisc",
601 do_parisc_entry, mod); 616 do_parisc_entry, mod);
617 else if (sym_is(symname, "__mod_ssb_device_table"))
618 do_table(symval, sym->st_size,
619 sizeof(struct ssb_device_id), "ssb",
620 do_ssb_entry, mod);
602} 621}
603 622
604/* Now add out buffered information to the generated C source */ 623/* Now add out buffered information to the generated C source */