summaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-01-08 03:06:42 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-20 20:52:08 -0800
commit72638f598ec9f05a43fcb22dc1dd8dc34c43acc1 (patch)
treed5db25827dea6b18354fa2acfad95b3a01d7e8b6 /scripts/mod
parent7143f7a1a3603002e4ef3719fa92e8dd6e607099 (diff)
downloadop-kernel-dev-72638f598ec9f05a43fcb22dc1dd8dc34c43acc1.zip
op-kernel-dev-72638f598ec9f05a43fcb22dc1dd8dc34c43acc1.tar.gz
PNP: fix broken pnp lowercasing for acpi module aliases
Based on a patch from Brian, who identified the issue. Signed-off-by: Bryan Kadzban <bryan@kadzban.is-a-geek.net> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/file2alias.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index d4dc222..491b8b1 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -366,11 +366,17 @@ static void do_pnp_device_entry(void *symval, unsigned long size,
for (i = 0; i < count; i++) {
const char *id = (char *)devs[i].id;
+ char acpi_id[sizeof(devs[0].id)];
+ int j;
buf_printf(&mod->dev_table_buf,
"MODULE_ALIAS(\"pnp:d%s*\");\n", id);
+
+ /* fix broken pnp bus lowercasing */
+ for (j = 0; j < sizeof(acpi_id); j++)
+ acpi_id[j] = toupper(id[j]);
buf_printf(&mod->dev_table_buf,
- "MODULE_ALIAS(\"acpi*:%s:*\");\n", id);
+ "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id);
}
}
@@ -416,10 +422,17 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
/* add an individual alias for every device entry */
if (!dup) {
+ char acpi_id[sizeof(card->devs[0].id)];
+ int k;
+
buf_printf(&mod->dev_table_buf,
"MODULE_ALIAS(\"pnp:d%s*\");\n", id);
+
+ /* fix broken pnp bus lowercasing */
+ for (k = 0; k < sizeof(acpi_id); k++)
+ acpi_id[k] = toupper(id[k]);
buf_printf(&mod->dev_table_buf,
- "MODULE_ALIAS(\"acpi*:%s:*\");\n", id);
+ "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id);
}
}
}
OpenPOWER on IntegriCloud