aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.mks.ru>2006-09-27 04:50:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:26:19 -0400
commit07563c711fbc25389e58ab9c9f0b9de2fce56760 (patch)
treeaadbe41b9303c636a2c44169680613b8b56d5006 /scripts
parentebba5f9fcb882306bef7175dee987342ec6fcf2f (diff)
[PATCH] EISA bus MODALIAS attributes support
Add modalias attribute support for the almost forgotten now EISA bus and (at least some) EISA-aware modules. The modalias entry looks like (for an 3c509 NIC): eisa:sTCM5093 and the in-module alias like: eisa:sTCM5093* The patch moves struct eisa_device_id declaration from include/linux/eisa.h to include/linux/mod_devicetable.h (so that the former now #includes the latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE declared), and adds recognision of __mod_eisa_device_table to scripts/mod/file2alias.c so that proper modules.alias will be generated. There's no support for /lib/modules/$kver/modules.eisamap, as it's not used by any existing tools, and because with in-kernel modalias mechanism those maps are obsolete anyway. The rationale for this patch is: a) to make EISA bus to act as other busses with modalias support, to unify driver loading b) to foget about EISA finally - with this patch, kernel (who still supports EISA) will be the only one who knows how to choose the necessary drivers for this bus ;) [akpm@osdl.org: fix the kbuild bit] Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Randy Dunlap <rdunlap@xenotime.net> Acked-the-net-bits-by: Jeff Garzik <jeff@garzik.org> Acked-the-tulip-bit-by: Valerie Henson <val_henson@linux.intel.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts')
-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 */