lkml.org 
[lkml]   [2008]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
SubjectRe: [PATCH] [RESEND] fix HID quirks for aluminium apple wireless keyboards
From
Date
Hi Paul,

I applied your patch from http://lkml.org/lkml/2008/6/14/26 but
without HID_QUIRK_APPLE_NUMLOCK_EMULATION to v2.6.25, but on my G4-ppc
iBook the quirk is not found by hidp_setup_quirks.
If I remove the calls to le16_to_cpu from that function it
works on my ppc, looks like some endianness issue, see the second patch.


diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 519cdb9..f96fb6e 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -676,6 +676,12 @@ static const struct {
__u16 idProduct;
unsigned quirks;
} hidp_blacklist[] = {
+ /* Apple Wireless Keyboard, ANSI layout */
+ { 0x05ac, 0x022c, HID_QUIRK_APPLE_HAS_FN },
+ /* Apple Wireless Keyboard, ISO layout */
+ { 0x05ac, 0x022d, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD },
+ /* Apple Wireless Keyboard, JIS layout */
+ { 0x05ac, 0x022e, HID_QUIRK_APPLE_HAS_FN },
/* Apple wireless Mighty Mouse */
{ 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },


diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index f96fb6e..46f5958 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -693,8 +693,8 @@ static void hidp_setup_quirks(struct hid_device *hid)
unsigned int n;

for (n = 0; hidp_blacklist[n].idVendor; n++)
- if (hidp_blacklist[n].idVendor == le16_to_cpu(hid->vendor) &&
- hidp_blacklist[n].idProduct == le16_to_cpu(hid->product))
+ if (hidp_blacklist[n].idVendor == hid->vendor &&
+ hidp_blacklist[n].idProduct == hid->product)
hid->quirks = hidp_blacklist[n].quirks;
}

--
Jan Scholz


\
 
 \ /
  Last update: 2008-06-27 19:03    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site