diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-09-24 03:56:20 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-24 03:56:20 -0400 |
| commit | ebdd90a8cb2e3963f55499850f02ce6003558b55 (patch) | |
| tree | d153f917ed41d257ddafa22f9cc2201bfddf8f9c /scripts/mod/file2alias.c | |
| parent | 3c9339049df5cc3a468c11de6c4101a1ea8c3d83 (diff) | |
| parent | 72d31053f62c4bc464c2783974926969614a8649 (diff) | |
Merge commit 'v2.6.27-rc7' into x86/pebs
Diffstat (limited to 'scripts/mod/file2alias.c')
| -rw-r--r-- | scripts/mod/file2alias.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 4fa1f3ad2513..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 */ |
