diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-05-04 12:56:12 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-05-04 12:56:12 +1000 |
commit | 29573173da86c36fd834b702eca5c56939dadaf4 (patch) | |
tree | 2628788d521567f1237210eabf891a572e7c16ce /scripts | |
parent | ab2ecabd305b55bb846b2fb50ef71752dbecfd25 (diff) | |
parent | 58e3abd889b00feac2f00f5b2ec93733fe13cafb (diff) |
Merge branch 'quilt/rr'
Conflicts:
drivers/net/virtio_net.c
include/linux/mod_devicetable.h
scripts/mod/file2alias.c
Diffstat (limited to 'scripts')
-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 36a60a853173..003ccd72601d 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -818,6 +818,19 @@ static int do_mdio_entry(const char *filename, 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) { @@ -969,6 +982,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, do_table(symval, sym->st_size, sizeof(struct mdio_device_id), "mdio", do_mdio_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); } |