diff options
author | Kyle McMartin <kyle@mako.i.cabal.ca> | 2007-01-13 22:58:21 +0300 |
---|---|---|
committer | Kyle McMartin <kyle@athena.road.mcmartin.ca> | 2007-02-17 09:08:45 +0300 |
commit | f3cf2673358e4221afbb59721a8580a8f35479a5 (patch) | |
tree | d42b74f1288b8d3737a47df4488c346ee546c581 /scripts/mod | |
parent | f2439b262ab11717c892efd5fdacf43f65f2a422 (diff) | |
download | linux-f3cf2673358e4221afbb59721a8580a8f35479a5.tar.xz |
[PARISC] generate modalias for parisc_device_id tables
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'scripts/mod')
-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, return 1; } +/* Looks like: parisc:tNhvNrevNsvN */ +static int do_parisc_entry(const char *filename, struct parisc_device_id *id, + char *alias) +{ + id->hw_type = TO_NATIVE(id->hw_type); + id->hversion = TO_NATIVE(id->hversion); + id->hversion_rev = TO_NATIVE(id->hversion_rev); + id->sversion = TO_NATIVE(id->sversion); + + strcpy(alias, "parisc:"); + ADD(alias, "t", id->hw_type != HWTYPE_ANY_ID, id->hw_type); + ADD(alias, "hv", id->hversion != HVERSION_ANY_ID, id->hversion); + ADD(alias, "rev", id->hversion_rev != HVERSION_REV_ANY_ID, id->hversion_rev); + ADD(alias, "sv", id->sversion != SVERSION_ANY_ID, id->sversion); + + return 1; +} + /* Ignore any prefix, eg. v850 prepends _ */ static inline int sym_is(const char *symbol, const char *name) { @@ -559,6 +577,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, do_table(symval, sym->st_size, sizeof(struct eisa_device_id), "eisa", do_eisa_entry, mod); + else if (sym_is(symname, "__mod_parisc_device_table")) + do_table(symval, sym->st_size, + sizeof(struct parisc_device_id), "parisc", + do_parisc_entry, mod); } /* Now add out buffered information to the generated C source */ |