diff options
author | Adam Belay <ambx1@neo.rr.com> | 2004-02-08 17:00:24 +0000 |
---|---|---|
committer | Adam Belay <ambx1@neo.rr.com> | 2004-02-08 17:00:24 +0000 |
commit | de6d71e900c5179e086723a842f33b64dd3ce721 (patch) | |
tree | 1e05fdd5b70cd1ec2a65384a10cc6c6a50328c59 /scripts | |
parent | 7a650c81159b1b34ca8762f6ba620c7deb821a8f (diff) | |
parent | bc2c9a763d6330e03e6027f5f832754b4b2b6fe5 (diff) | |
download | history-de6d71e900c5179e086723a842f33b64dd3ce721.tar.gz |
Merge http://linux.bkbits.net/linux-2.5
into neo.rr.com:/home/ambx1/linux/bk/linus-2.5
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/file2alias.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/file2alias.c b/scripts/file2alias.c index 1528dddebe7e09..fa8fd160b2b86a 100644 --- a/scripts/file2alias.c +++ b/scripts/file2alias.c @@ -176,6 +176,29 @@ static int do_ccw_entry(const char *filename, return 1; } +/* looks like: "pnp:dD" */ +static int do_pnp_entry(const char *filename, + struct pnp_device_id *id, char *alias) +{ + sprintf(alias, "pnp:d%s", id->id); + return 1; +} + +/* looks like: "pnp:cCdD..." */ +static int do_pnp_card_entry(const char *filename, + struct pnp_card_device_id *id, char *alias) +{ + int i; + + sprintf(alias, "pnp:c%s", id->id); + for (i = 0; i < PNP_MAX_DEVICES; i++) { + if (! *id->devs[i].id) + break; + sprintf(alias + strlen(alias), "d%s", id->devs[i].id); + } + return 1; +} + /* Ignore any prefix, eg. v850 prepends _ */ static inline int sym_is(const char *symbol, const char *name) { @@ -242,6 +265,12 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, else if (sym_is(symname, "__mod_ccw_device_table")) do_table(symval, sym->st_size, sizeof(struct ccw_device_id), do_ccw_entry, mod); + else if (sym_is(symname, "__mod_pnp_device_table")) + do_table(symval, sym->st_size, sizeof(struct pnp_device_id), + do_pnp_entry, mod); + else if (sym_is(symname, "__mod_pnp_card_device_table")) + do_table(symval, sym->st_size, sizeof(struct pnp_card_device_id), + do_pnp_card_entry, mod); } /* Now add out buffered information to the generated C source */ |