aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-input.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index e542ef971c46..14cdf09316ce 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -128,12 +128,6 @@ static struct hidinput_key_translation powerbook_iso_keyboard[] = {
128 { } 128 { }
129}; 129};
130 130
131
132static int usbhid_pb_fnmode = 1;
133module_param_named(pb_fnmode, usbhid_pb_fnmode, int, 0644);
134MODULE_PARM_DESC(pb_fnmode,
135 "Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)");
136
137static struct hidinput_key_translation *find_translation(struct hidinput_key_translation *table, u16 from) 131static struct hidinput_key_translation *find_translation(struct hidinput_key_translation *table, u16 from)
138{ 132{
139 struct hidinput_key_translation *trans; 133 struct hidinput_key_translation *trans;
@@ -160,7 +154,7 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input,
160 return 1; 154 return 1;
161 } 155 }
162 156
163 if (usbhid_pb_fnmode) { 157 if (hid->pb_fnmode) {
164 int do_translate; 158 int do_translate;
165 159
166 trans = find_translation(powerbook_fn_keys, usage->code); 160 trans = find_translation(powerbook_fn_keys, usage->code);
@@ -169,8 +163,8 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input,
169 do_translate = 1; 163 do_translate = 1;
170 else if (trans->flags & POWERBOOK_FLAG_FKEY) 164 else if (trans->flags & POWERBOOK_FLAG_FKEY)
171 do_translate = 165 do_translate =
172 (usbhid_pb_fnmode == 2 && (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)) || 166 (hid->pb_fnmode == 2 && (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)) ||
173 (usbhid_pb_fnmode == 1 && !(hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)); 167 (hid->pb_fnmode == 1 && !(hid->quirks & HID_QUIRK_POWERBOOK_FN_ON));
174 else 168 else
175 do_translate = (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON); 169 do_translate = (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON);
176 170