* [PATCH] modules: hid id->bus needs TO_NATIVE() in scripts/mod/file2alias.c
@ 2009-02-17 8:45 Nye Liu
0 siblings, 0 replies; only message in thread
From: Nye Liu @ 2009-02-17 8:45 UTC (permalink / raw)
To: linux-kernel, nyet
From: Nye Liu <nyet@mrv.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@mrv.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@mrv.com
(818) 772-6235x248
(818) 772-0576 fax
"Who would be stupid enough to quote a fictitious character?"
-- Don Quixote
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-17 8:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-17 8:45 [PATCH] modules: hid id->bus needs TO_NATIVE() in scripts/mod/file2alias.c Nye Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).