diff options
| author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-02-24 12:18:37 +0100 |
|---|---|---|
| committer | Vojtech Pavlik <vojtech@suse.cz> | 2005-02-24 12:18:37 +0100 |
| commit | 0da2df3d7d95f85b6b61014517ee9421ce5a1772 (patch) | |
| tree | 7f7d86c577ac3d056545734c2069730b1250d8e2 /scripts/mod | |
| parent | cfac99f238d7d22ea583b414b98e492dc9abc09d (diff) | |
input: adjust file2alias utility to export aliases for
serio drivers (serio:tyNprNidNexN).
Move serio_device_id from serio.h to mod_devicetable.h
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Diffstat (limited to 'scripts/mod')
| -rw-r--r-- | scripts/mod/file2alias.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 7c8f064f03bb..d54b52d3bb6f 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -4,7 +4,7 @@ * * Copyright 2002-2003 Rusty Russell, IBM Corporation * 2003 Kai Germaschewski - * + * * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. @@ -181,6 +181,24 @@ static int do_ccw_entry(const char *filename, return 1; } +/* Looks like: "serio:tyNprNidNexN" */ +static int do_serio_entry(const char *filename, + struct serio_device_id *id, char *alias) +{ + id->type = TO_NATIVE(id->type); + id->proto = TO_NATIVE(id->proto); + id->id = TO_NATIVE(id->id); + id->extra = TO_NATIVE(id->extra); + + strcpy(alias, "serio:"); + ADD(alias, "ty", id->type != SERIO_ANY, id->type); + ADD(alias, "pr", id->proto != SERIO_ANY, id->proto); + ADD(alias, "id", id->id != SERIO_ANY, id->id); + ADD(alias, "ex", id->extra != SERIO_ANY, id->extra); + + return 1; +} + /* looks like: "pnp:dD" */ static int do_pnp_entry(const char *filename, struct pnp_device_id *id, char *alias) @@ -270,6 +288,9 @@ 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_serio_device_table")) + do_table(symval, sym->st_size, sizeof(struct serio_device_id), + do_serio_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); |
