diff options
Diffstat (limited to 'drivers/macintosh/adbhid.c')
-rw-r--r-- | drivers/macintosh/adbhid.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index b7fb367808d8..5066e7a8ea9c 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
@@ -222,7 +222,7 @@ static struct adbhid *adbhid[16]; | |||
222 | 222 | ||
223 | static void adbhid_probe(void); | 223 | static void adbhid_probe(void); |
224 | 224 | ||
225 | static void adbhid_input_keycode(int, int, int, struct pt_regs *); | 225 | static void adbhid_input_keycode(int, int, int); |
226 | 226 | ||
227 | static void init_trackpad(int id); | 227 | static void init_trackpad(int id); |
228 | static void init_trackball(int id); | 228 | static void init_trackball(int id); |
@@ -253,7 +253,7 @@ static struct adb_ids buttons_ids; | |||
253 | #define ADBMOUSE_MACALLY2 9 /* MacAlly 2-button mouse */ | 253 | #define ADBMOUSE_MACALLY2 9 /* MacAlly 2-button mouse */ |
254 | 254 | ||
255 | static void | 255 | static void |
256 | adbhid_keyboard_input(unsigned char *data, int nb, struct pt_regs *regs, int apoll) | 256 | adbhid_keyboard_input(unsigned char *data, int nb, int apoll) |
257 | { | 257 | { |
258 | int id = (data[0] >> 4) & 0x0f; | 258 | int id = (data[0] >> 4) & 0x0f; |
259 | 259 | ||
@@ -266,13 +266,13 @@ adbhid_keyboard_input(unsigned char *data, int nb, struct pt_regs *regs, int apo | |||
266 | /* first check this is from register 0 */ | 266 | /* first check this is from register 0 */ |
267 | if (nb != 3 || (data[0] & 3) != KEYB_KEYREG) | 267 | if (nb != 3 || (data[0] & 3) != KEYB_KEYREG) |
268 | return; /* ignore it */ | 268 | return; /* ignore it */ |
269 | adbhid_input_keycode(id, data[1], 0, regs); | 269 | adbhid_input_keycode(id, data[1], 0); |
270 | if (!(data[2] == 0xff || (data[2] == 0x7f && data[1] == 0x7f))) | 270 | if (!(data[2] == 0xff || (data[2] == 0x7f && data[1] == 0x7f))) |
271 | adbhid_input_keycode(id, data[2], 0, regs); | 271 | adbhid_input_keycode(id, data[2], 0); |
272 | } | 272 | } |
273 | 273 | ||
274 | static void | 274 | static void |
275 | adbhid_input_keycode(int id, int keycode, int repeat, struct pt_regs *regs) | 275 | adbhid_input_keycode(int id, int keycode, int repeat) |
276 | { | 276 | { |
277 | struct adbhid *ahid = adbhid[id]; | 277 | struct adbhid *ahid = adbhid[id]; |
278 | int up_flag; | 278 | int up_flag; |
@@ -282,7 +282,6 @@ adbhid_input_keycode(int id, int keycode, int repeat, struct pt_regs *regs) | |||
282 | 282 | ||
283 | switch (keycode) { | 283 | switch (keycode) { |
284 | case ADB_KEY_CAPSLOCK: /* Generate down/up events for CapsLock everytime. */ | 284 | case ADB_KEY_CAPSLOCK: /* Generate down/up events for CapsLock everytime. */ |
285 | input_regs(ahid->input, regs); | ||
286 | input_report_key(ahid->input, KEY_CAPSLOCK, 1); | 285 | input_report_key(ahid->input, KEY_CAPSLOCK, 1); |
287 | input_report_key(ahid->input, KEY_CAPSLOCK, 0); | 286 | input_report_key(ahid->input, KEY_CAPSLOCK, 0); |
288 | input_sync(ahid->input); | 287 | input_sync(ahid->input); |
@@ -338,7 +337,6 @@ adbhid_input_keycode(int id, int keycode, int repeat, struct pt_regs *regs) | |||
338 | } | 337 | } |
339 | 338 | ||
340 | if (adbhid[id]->keycode[keycode]) { | 339 | if (adbhid[id]->keycode[keycode]) { |
341 | input_regs(adbhid[id]->input, regs); | ||
342 | input_report_key(adbhid[id]->input, | 340 | input_report_key(adbhid[id]->input, |
343 | adbhid[id]->keycode[keycode], !up_flag); | 341 | adbhid[id]->keycode[keycode], !up_flag); |
344 | input_sync(adbhid[id]->input); | 342 | input_sync(adbhid[id]->input); |
@@ -349,7 +347,7 @@ adbhid_input_keycode(int id, int keycode, int repeat, struct pt_regs *regs) | |||
349 | } | 347 | } |
350 | 348 | ||
351 | static void | 349 | static void |
352 | adbhid_mouse_input(unsigned char *data, int nb, struct pt_regs *regs, int autopoll) | 350 | adbhid_mouse_input(unsigned char *data, int nb, int autopoll) |
353 | { | 351 | { |
354 | int id = (data[0] >> 4) & 0x0f; | 352 | int id = (data[0] >> 4) & 0x0f; |
355 | 353 | ||
@@ -432,8 +430,6 @@ adbhid_mouse_input(unsigned char *data, int nb, struct pt_regs *regs, int autopo | |||
432 | break; | 430 | break; |
433 | } | 431 | } |
434 | 432 | ||
435 | input_regs(adbhid[id]->input, regs); | ||
436 | |||
437 | input_report_key(adbhid[id]->input, BTN_LEFT, !((data[1] >> 7) & 1)); | 433 | input_report_key(adbhid[id]->input, BTN_LEFT, !((data[1] >> 7) & 1)); |
438 | input_report_key(adbhid[id]->input, BTN_MIDDLE, !((data[2] >> 7) & 1)); | 434 | input_report_key(adbhid[id]->input, BTN_MIDDLE, !((data[2] >> 7) & 1)); |
439 | 435 | ||
@@ -449,7 +445,7 @@ adbhid_mouse_input(unsigned char *data, int nb, struct pt_regs *regs, int autopo | |||
449 | } | 445 | } |
450 | 446 | ||
451 | static void | 447 | static void |
452 | adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int autopoll) | 448 | adbhid_buttons_input(unsigned char *data, int nb, int autopoll) |
453 | { | 449 | { |
454 | int id = (data[0] >> 4) & 0x0f; | 450 | int id = (data[0] >> 4) & 0x0f; |
455 | 451 | ||
@@ -458,8 +454,6 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto | |||
458 | return; | 454 | return; |
459 | } | 455 | } |
460 | 456 | ||
461 | input_regs(adbhid[id]->input, regs); | ||
462 | |||
463 | switch (adbhid[id]->original_handler_id) { | 457 | switch (adbhid[id]->original_handler_id) { |
464 | default: | 458 | default: |
465 | case 0x02: /* Adjustable keyboard button device */ | 459 | case 0x02: /* Adjustable keyboard button device */ |