diff options
author | Jiri Kosina <jkosina@suse.cz> | 2006-12-08 12:41:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-08 13:43:19 -0500 |
commit | 4c2ae844b5ef85fd4b571c9c91ac48afa6ef2dfc (patch) | |
tree | 814a010b2a4f23de93600b2783a8286201e1d1fb /drivers/hid/hid-input.c | |
parent | aa8de2f038baec993f07ef66fb3e94481d1ec22b (diff) |
[PATCH] Generic HID layer - pb_fnmode
pb_fnmode parameter has to be passed to usbhid, both for compatibility reasons
and also because it logically belongs there.
Also removes empty hid-input.c file in drivers/usb/input.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 12 |
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 | |||
132 | static int usbhid_pb_fnmode = 1; | ||
133 | module_param_named(pb_fnmode, usbhid_pb_fnmode, int, 0644); | ||
134 | MODULE_PARM_DESC(pb_fnmode, | ||
135 | "Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)"); | ||
136 | |||
137 | static struct hidinput_key_translation *find_translation(struct hidinput_key_translation *table, u16 from) | 131 | static 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 | ||