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 | |
parent | 3c9339049df5cc3a468c11de6c4101a1ea8c3d83 (diff) | |
parent | 72d31053f62c4bc464c2783974926969614a8649 (diff) |
Merge commit 'v2.6.27-rc7' into x86/pebs
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/file2alias.c | 16 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 2 |
2 files changed, 12 insertions, 6 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 */ |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 8f038e6d5f98..418cd7dbbc93 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1468,7 +1468,7 @@ static void section_rel(const char *modname, struct elf_info *elf, | |||
1468 | * marked __initdata will be discarded when the module has been intialized. | 1468 | * marked __initdata will be discarded when the module has been intialized. |
1469 | * Likewise for modules used built-in the sections marked __exit | 1469 | * Likewise for modules used built-in the sections marked __exit |
1470 | * are discarded because __exit marked function are supposed to be called | 1470 | * are discarded because __exit marked function are supposed to be called |
1471 | * only when a moduel is unloaded which never happes for built-in modules. | 1471 | * only when a module is unloaded which never happens for built-in modules. |
1472 | * The check_sec_ref() function traverses all relocation records | 1472 | * The check_sec_ref() function traverses all relocation records |
1473 | * to find all references to a section that reference a section that will | 1473 | * to find all references to a section that reference a section that will |
1474 | * be discarded and warns about it. | 1474 | * be discarded and warns about it. |