diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 17:15:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 17:15:44 -0700 |
commit | a8251096b427283c47e7d8f9568be6b388dd68ec (patch) | |
tree | edc9747e30b4b4413aa99acfbd3104d81b1c303b /scripts/mod | |
parent | 27a3353a4525afe984f3b793681869d636136b69 (diff) | |
parent | 480b02df3aa9f07d1c7df0cd8be7a5ca73893455 (diff) | |
download | linux-a8251096b427283c47e7d8f9568be6b388dd68ec.tar.bz2 |
Merge branch 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
module: drop the lock while waiting for module to complete initialization.
MODULE_DEVICE_TABLE(isapnp, ...) does nothing
hisax_fcpcipnp: fix broken isapnp device table.
isapnp: move definitions to mod_devicetable.h so file2alias can reach them.
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/file2alias.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 9cf2400580a7..5758aab0d8bb 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -828,6 +828,19 @@ static int do_zorro_entry(const char *filename, struct zorro_device_id *id, return 1; } +/* looks like: "pnp:dD" */ +static int do_isapnp_entry(const char *filename, + struct isapnp_device_id *id, char *alias) +{ + sprintf(alias, "pnp:d%c%c%c%x%x%x%x*", + 'A' + ((id->vendor >> 2) & 0x3f) - 1, + 'A' + (((id->vendor & 3) << 3) | ((id->vendor >> 13) & 7)) - 1, + 'A' + ((id->vendor >> 8) & 0x1f) - 1, + (id->function >> 4) & 0x0f, id->function & 0x0f, + (id->function >> 12) & 0x0f, (id->function >> 8) & 0x0f); + return 1; +} + /* Ignore any prefix, eg. some architectures prepend _ */ static inline int sym_is(const char *symbol, const char *name) { @@ -983,6 +996,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, do_table(symval, sym->st_size, sizeof(struct zorro_device_id), "zorro", do_zorro_entry, mod); + else if (sym_is(symname, "__mod_isapnp_device_table")) + do_table(symval, sym->st_size, + sizeof(struct isapnp_device_id), "isa", + do_isapnp_entry, mod); free(zeros); } |