[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20090217084523.GA3623@mrv.com>
Date: Tue, 17 Feb 2009 00:45:27 -0800
From: Nye Liu <nyet@....com>
To: linux-kernel@...r.kernel.org, nyet@...t.org
Subject: [PATCH] modules: hid id->bus needs TO_NATIVE() in
scripts/mod/file2alias.c
From: Nye Liu <nyet@....com>
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@....com>
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@....com
(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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists