aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/file2alias.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index de76da80443f..f61c9ccef6aa 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -444,6 +444,14 @@ static int do_input_entry(const char *filename, struct input_device_id *id,
444 return 1; 444 return 1;
445} 445}
446 446
447static int do_eisa_entry(const char *filename, struct eisa_device_id *eisa,
448 char *alias)
449{
450 if (eisa->sig[0])
451 sprintf(alias, EISA_DEVICE_MODALIAS_FMT "*", eisa->sig);
452 return 1;
453}
454
447/* Ignore any prefix, eg. v850 prepends _ */ 455/* Ignore any prefix, eg. v850 prepends _ */
448static inline int sym_is(const char *symbol, const char *name) 456static inline int sym_is(const char *symbol, const char *name)
449{ 457{
@@ -547,6 +555,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
547 do_table(symval, sym->st_size, 555 do_table(symval, sym->st_size,
548 sizeof(struct input_device_id), "input", 556 sizeof(struct input_device_id), "input",
549 do_input_entry, mod); 557 do_input_entry, mod);
558 else if (sym_is(symname, "__mod_eisa_device_table"))
559 do_table(symval, sym->st_size,
560 sizeof(struct eisa_device_id), "eisa",
561 do_eisa_entry, mod);
550} 562}
551 563
552/* Now add out buffered information to the generated C source */ 564/* Now add out buffered information to the generated C source */