diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-22 07:08:57 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-22 07:08:57 -0400 |
commit | 0b88641f1bafdbd087d5e63987a30cc0eadd63b9 (patch) | |
tree | 81dcf756db373444140bb2623584710c628e3048 /scripts/mod/file2alias.c | |
parent | fbdbf709938d155c719c76b9894d28342632c797 (diff) | |
parent | 72d31053f62c4bc464c2783974926969614a8649 (diff) |
Merge commit 'v2.6.27-rc7' into x86/debug
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 1fcaf3284a6a..4c9890ec2528 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -344,14 +344,20 @@ static void do_pnp_device_entry(void *symval, unsigned long size, | |||
344 | struct module *mod) | 344 | struct module *mod) |
345 | { | 345 | { |
346 | const unsigned long id_size = sizeof(struct pnp_device_id); | 346 | const unsigned long id_size = sizeof(struct pnp_device_id); |
347 | const struct pnp_device_id *id = symval; | 347 | const unsigned int count = (size / id_size)-1; |
348 | const struct pnp_device_id *devs = symval; | ||
349 | unsigned int i; | ||
348 | 350 | ||
349 | device_id_check(mod->name, "pnp", size, id_size, symval); | 351 | device_id_check(mod->name, "pnp", size, id_size, symval); |
350 | 352 | ||
351 | buf_printf(&mod->dev_table_buf, | 353 | for (i = 0; i < count; i++) { |
352 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id->id); | 354 | const char *id = (char *)devs[i].id; |
353 | buf_printf(&mod->dev_table_buf, | 355 | |
354 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", id->id); | 356 | buf_printf(&mod->dev_table_buf, |
357 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); | ||
358 | buf_printf(&mod->dev_table_buf, | ||
359 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", id); | ||
360 | } | ||
355 | } | 361 | } |
356 | 362 | ||
357 | /* looks like: "pnp:dD" for every device of the card */ | 363 | /* looks like: "pnp:dD" for every device of the card */ |
@@ -623,7 +629,7 @@ static int do_i2c_entry(const char *filename, struct i2c_device_id *id, | |||
623 | return 1; | 629 | return 1; |
624 | } | 630 | } |
625 | 631 | ||
626 | /* Ignore any prefix, eg. v850 prepends _ */ | 632 | /* Ignore any prefix, eg. some architectures prepend _ */ |
627 | static inline int sym_is(const char *symbol, const char *name) | 633 | static inline int sym_is(const char *symbol, const char *name) |
628 | { | 634 | { |
629 | const char *match; | 635 | const char *match; |