aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-apple.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-apple.c')
-rw-r--r--drivers/hid/hid-apple.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 4b96e7a898cf..1433cbbaa99f 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -40,6 +40,11 @@ module_param(fnmode, uint, 0644);
40MODULE_PARM_DESC(fnmode, "Mode of fn key on Apple keyboards (0 = disabled, " 40MODULE_PARM_DESC(fnmode, "Mode of fn key on Apple keyboards (0 = disabled, "
41 "[1] = fkeyslast, 2 = fkeysfirst)"); 41 "[1] = fkeyslast, 2 = fkeysfirst)");
42 42
43static unsigned int iso_layout = 1;
44module_param(iso_layout, uint, 0644);
45MODULE_PARM_DESC(iso_layout, "Enable/Disable hardcoded ISO-layout of the keyboard. "
46 "(0 = disabled, [1] = enabled)");
47
43struct apple_sc { 48struct apple_sc {
44 unsigned long quirks; 49 unsigned long quirks;
45 unsigned int fn_on; 50 unsigned int fn_on;
@@ -199,11 +204,13 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
199 } 204 }
200 } 205 }
201 206
202 if (asc->quirks & APPLE_ISO_KEYBOARD) { 207 if (iso_layout) {
203 trans = apple_find_translation(apple_iso_keyboard, usage->code); 208 if (asc->quirks & APPLE_ISO_KEYBOARD) {
204 if (trans) { 209 trans = apple_find_translation(apple_iso_keyboard, usage->code);
205 input_event(input, usage->type, trans->to, value); 210 if (trans) {
206 return 1; 211 input_event(input, usage->type, trans->to, value);
212 return 1;
213 }
207 } 214 }
208 } 215 }
209 216