[PATCH] modules: hid id->bus needs TO_NATIVE() inscripts/mod/file2alias.c
From: Nye Liu
Date: Tue Feb 17 2009 - 03:45:44 EST
From: Nye Liu <nyet@xxxxxxx>
When building a module alias, the bus identifier must be converted to
native endianness. The hid bus id entries were not being properly
swapped in little endian systems.
For example:
# modinfo hid_dell
filename:
/lib/modules/2.6.28-1-amd64/kernel/drivers/hid/hid-dell.ko
license: GPL
alias: hid:b0300v000013BAp00000017
alias: hid:b0300v0000413Cp00002105
alias: hid:b0300v0000413Cp00002005
depends: hid,usbhid
b0300 should read b0003
Signed-off-by: Nye Liu <nyet@xxxxxxx>
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 491b8b1..4eea60b 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,
static int do_hid_entry(const char *filename,
struct hid_device_id *id, char *alias)
{
+ id->bus = TO_NATIVE(id->bus);
id->vendor = TO_NATIVE(id->vendor);
id->product = TO_NATIVE(id->product);
--
Nye Liu
nliu@xxxxxxx
(818) 772-6235x248
(818) 772-0576 fax
"Who would be stupid enough to quote a fictitious character?"
-- Don Quixote
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/