]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.1.1/hid-consolidate-macbookair-4-1-mappings.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.1 / hid-consolidate-macbookair-4-1-mappings.patch
CommitLineData
f9eeb4e4
GKH
1From da617c7cb915545dda4280df888dd6f8d5697420 Mon Sep 17 00:00:00 2001
2From: Jiri Kosina <jkosina@suse.cz>
3Date: Wed, 5 Oct 2011 16:54:45 +0200
4Subject: HID: consolidate MacbookAir 4,1 mappings
5
6From: Jiri Kosina <jkosina@suse.cz>
7
8commit da617c7cb915545dda4280df888dd6f8d5697420 upstream.
9
10MacbookAir 4,1 doesn't require extra mapping table, as the mappings
11are identical to apple_fn_keys[].
12
13Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15
16---
17 drivers/hid/hid-apple.c | 25 -------------------------
18 1 file changed, 25 deletions(-)
19
20--- a/drivers/hid/hid-apple.c
21+++ b/drivers/hid/hid-apple.c
22@@ -82,28 +82,6 @@ static const struct apple_key_translatio
23 { }
24 };
25
26-static const struct apple_key_translation macbookair4_fn_keys[] = {
27- { KEY_BACKSPACE, KEY_DELETE },
28- { KEY_ENTER, KEY_INSERT },
29- { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
30- { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY },
31- { KEY_F3, KEY_SCALE, APPLE_FLAG_FKEY },
32- { KEY_F4, KEY_DASHBOARD, APPLE_FLAG_FKEY },
33- { KEY_F5, KEY_KBDILLUMDOWN, APPLE_FLAG_FKEY },
34- { KEY_F6, KEY_KBDILLUMUP, APPLE_FLAG_FKEY },
35- { KEY_F7, KEY_PREVIOUSSONG, APPLE_FLAG_FKEY },
36- { KEY_F8, KEY_PLAYPAUSE, APPLE_FLAG_FKEY },
37- { KEY_F9, KEY_NEXTSONG, APPLE_FLAG_FKEY },
38- { KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY },
39- { KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY },
40- { KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY },
41- { KEY_UP, KEY_PAGEUP },
42- { KEY_DOWN, KEY_PAGEDOWN },
43- { KEY_LEFT, KEY_HOME },
44- { KEY_RIGHT, KEY_END },
45- { }
46-};
47-
48 static const struct apple_key_translation apple_fn_keys[] = {
49 { KEY_BACKSPACE, KEY_DELETE },
50 { KEY_ENTER, KEY_INSERT },
51@@ -208,9 +186,6 @@ static int hidinput_apple_event(struct h
52 else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI &&
53 hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6_JIS)
54 table = macbookair_fn_keys;
55- else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI &&
56- hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS)
57- table = macbookair4_fn_keys;
58 else if (hid->product < 0x21d || hid->product >= 0x300)
59 table = powerbook_fn_keys;
60 else