]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.1.1/hid-apple-modern-macbook-airs-use-the-standard-apple-function-key-translations.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.1 / hid-apple-modern-macbook-airs-use-the-standard-apple-function-key-translations.patch
1 From 21404b772a1c65f7b935b8c0fddc388a949f4e31 Mon Sep 17 00:00:00 2001
2 From: Linus Torvalds <torvalds@linux-foundation.org>
3 Date: Sun, 6 Nov 2011 18:34:03 -0800
4 Subject: hid/apple: modern macbook airs use the standard apple function key translations
5
6 From: Linus Torvalds <torvalds@linux-foundation.org>
7
8 commit 21404b772a1c65f7b935b8c0fddc388a949f4e31 upstream.
9
10 This removes the use of the special "macbookair_fn_keys" keyboard
11 translation table for the MacBookAir4,x models (ie the 2011 refresh).
12 They use the standard apple_fn_keys[] translation. Apparently only the
13 old MacBook Air's need a different translation table.
14
15 This mirrors the change that commit da617c7cb915 ("HID: consolidate
16 MacbookAir 4,1 mappings") did for the WELLSPRING6A ones, but does it for
17 the WELLSPRING6 model used on the MacBookAir4,2.
18
19 Reported-and-tested-by: Dirk Hohndel <hohndel@infradead.org>
20 Cc: Jiri Kosina <jkosina@suse.cz>
21 Cc: Joshua V Dillon <jvdillon@gmail.com>
22 Cc: Chase Douglas <chase.douglas@canonical.com>
23 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
25
26 --- a/drivers/hid/hid-apple.c
27 +++ b/drivers/hid/hid-apple.c
28 @@ -183,9 +183,6 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
29 if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
30 hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
31 table = macbookair_fn_keys;
32 - else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI &&
33 - hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6_JIS)
34 - table = macbookair_fn_keys;
35 else if (hid->product < 0x21d || hid->product >= 0x300)
36 table = powerbook_fn_keys;
37 else