diff options
author | Len Brown <len.brown@intel.com> | 2005-09-03 02:44:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-03 02:44:09 -0400 |
commit | 129521dcc94f781890f8f668219ab79f0073ff9f (patch) | |
tree | 9f70707c88da65577f38814fe37b24c4b4957d64 /scripts | |
parent | 824b558bbe2c298b165cdb54c33718994dda30bb (diff) | |
parent | f505380ba7b98ec97bf25300c2a58aeae903530b (diff) |
Merge linux-2.6 into linux-acpi-2.6 test
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/file2alias.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 5180405c1a84..d8ee38aede26 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -341,6 +341,22 @@ static int do_of_entry (const char *filename, struct of_device_id *of, char *ali | |||
341 | return 1; | 341 | return 1; |
342 | } | 342 | } |
343 | 343 | ||
344 | static int do_vio_entry(const char *filename, struct vio_device_id *vio, | ||
345 | char *alias) | ||
346 | { | ||
347 | char *tmp; | ||
348 | |||
349 | sprintf(alias, "vio:T%sS%s", vio->type[0] ? vio->type : "*", | ||
350 | vio->compat[0] ? vio->compat : "*"); | ||
351 | |||
352 | /* Replace all whitespace with underscores */ | ||
353 | for (tmp = alias; tmp && *tmp; tmp++) | ||
354 | if (isspace (*tmp)) | ||
355 | *tmp = '_'; | ||
356 | |||
357 | return 1; | ||
358 | } | ||
359 | |||
344 | /* Ignore any prefix, eg. v850 prepends _ */ | 360 | /* Ignore any prefix, eg. v850 prepends _ */ |
345 | static inline int sym_is(const char *symbol, const char *name) | 361 | static inline int sym_is(const char *symbol, const char *name) |
346 | { | 362 | { |
@@ -422,6 +438,9 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
422 | else if (sym_is(symname, "__mod_of_device_table")) | 438 | else if (sym_is(symname, "__mod_of_device_table")) |
423 | do_table(symval, sym->st_size, sizeof(struct of_device_id), | 439 | do_table(symval, sym->st_size, sizeof(struct of_device_id), |
424 | do_of_entry, mod); | 440 | do_of_entry, mod); |
441 | else if (sym_is(symname, "__mod_vio_device_table")) | ||
442 | do_table(symval, sym->st_size, sizeof(struct vio_device_id), | ||
443 | do_vio_entry, mod); | ||
425 | 444 | ||
426 | } | 445 | } |
427 | 446 | ||