diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-25 10:40:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-25 10:40:10 -0500 |
commit | 2e31add2a7e2a15d07f592c21ba35870fa9a1d1f (patch) | |
tree | 814e2c70fb5528f108114c0da6e5a1e219e6a0e1 /scripts/mod | |
parent | d639bab8da86d330493487e8c0fea8ca31f53427 (diff) | |
parent | 17581ad812a9abb0182260374ef2e52d4a808a64 (diff) |
Merge branch 'x86/urgent' into x86/pat
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/file2alias.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index d4dc222a74f3..4eea60b1693e 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -210,6 +210,7 @@ static void do_usb_table(void *symval, unsigned long size, | |||
210 | static int do_hid_entry(const char *filename, | 210 | static int do_hid_entry(const char *filename, |
211 | struct hid_device_id *id, char *alias) | 211 | struct hid_device_id *id, char *alias) |
212 | { | 212 | { |
213 | id->bus = TO_NATIVE(id->bus); | ||
213 | id->vendor = TO_NATIVE(id->vendor); | 214 | id->vendor = TO_NATIVE(id->vendor); |
214 | id->product = TO_NATIVE(id->product); | 215 | id->product = TO_NATIVE(id->product); |
215 | 216 | ||
@@ -366,11 +367,17 @@ static void do_pnp_device_entry(void *symval, unsigned long size, | |||
366 | 367 | ||
367 | for (i = 0; i < count; i++) { | 368 | for (i = 0; i < count; i++) { |
368 | const char *id = (char *)devs[i].id; | 369 | const char *id = (char *)devs[i].id; |
370 | char acpi_id[sizeof(devs[0].id)]; | ||
371 | int j; | ||
369 | 372 | ||
370 | buf_printf(&mod->dev_table_buf, | 373 | buf_printf(&mod->dev_table_buf, |
371 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); | 374 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); |
375 | |||
376 | /* fix broken pnp bus lowercasing */ | ||
377 | for (j = 0; j < sizeof(acpi_id); j++) | ||
378 | acpi_id[j] = toupper(id[j]); | ||
372 | buf_printf(&mod->dev_table_buf, | 379 | buf_printf(&mod->dev_table_buf, |
373 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", id); | 380 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id); |
374 | } | 381 | } |
375 | } | 382 | } |
376 | 383 | ||
@@ -416,10 +423,17 @@ static void do_pnp_card_entries(void *symval, unsigned long size, | |||
416 | 423 | ||
417 | /* add an individual alias for every device entry */ | 424 | /* add an individual alias for every device entry */ |
418 | if (!dup) { | 425 | if (!dup) { |
426 | char acpi_id[sizeof(card->devs[0].id)]; | ||
427 | int k; | ||
428 | |||
419 | buf_printf(&mod->dev_table_buf, | 429 | buf_printf(&mod->dev_table_buf, |
420 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); | 430 | "MODULE_ALIAS(\"pnp:d%s*\");\n", id); |
431 | |||
432 | /* fix broken pnp bus lowercasing */ | ||
433 | for (k = 0; k < sizeof(acpi_id); k++) | ||
434 | acpi_id[k] = toupper(id[k]); | ||
421 | buf_printf(&mod->dev_table_buf, | 435 | buf_printf(&mod->dev_table_buf, |
422 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", id); | 436 | "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id); |
423 | } | 437 | } |
424 | } | 438 | } |
425 | } | 439 | } |