Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227594
b: refs/heads/master
c: a4bc692
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Kosina committed Nov 3, 2010
1 parent 89dbc8b commit f64de8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99b9f758bbc904f22faffcf4d83205f4a5e7bc0c
refs/heads/master: a4bc6926d05b60bf70aab2db2c6715e15118cbdc
19 changes: 10 additions & 9 deletions trunk/drivers/hid/hid-apple.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
struct hid_usage *usage, __s32 value)
{
struct apple_sc *asc = hid_get_drvdata(hid);
const struct apple_key_translation *trans;
const struct apple_key_translation *trans, *table;

if (usage->code == KEY_FN) {
asc->fn_on = !!value;
Expand All @@ -178,14 +178,15 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
if (fnmode) {
int do_translate;

if(hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) {
trans = apple_find_translation(macbookair_fn_keys, usage->code);
} else if (hid->product < 0x21d || hid->product >= 0x300) {
trans = apple_find_translation(powerbook_fn_keys, usage->code);
} else {
trans = apple_find_translation(apple_fn_keys, usage->code);
}
if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
table = macbookair_fn_keys;
else if (hid->product < 0x21d || hid->product >= 0x300)
table = powerbook_fn_keys;
else
table = apple_fn_keys;

trans = apple_find_translation (table, usage->code);

if (trans) {
if (test_bit(usage->code, asc->pressed_fn))
Expand Down

0 comments on commit f64de8f

Please sign in to comment.