diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-25 08:39:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-25 08:39:12 -0400 |
commit | f58899bb0224741eb0409ada67ecafe90ba137ef (patch) | |
tree | 78284f77021e830b32e77071dd2ef4e5ccdaa289 /scripts/mod/file2alias.c | |
parent | a2bd7274b47124d2fc4dfdb8c0591f545ba749dd (diff) | |
parent | 83097aca8567a0bd593534853b71fe0fa9a75d69 (diff) |
Merge branch 'linus' into x86/urgent
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 */ |