diff options
Diffstat (limited to 'drivers/usb/input/usbtouchscreen.c')
-rw-r--r-- | drivers/usb/input/usbtouchscreen.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c index 923e22db18d4..f26c1cd1129f 100644 --- a/drivers/usb/input/usbtouchscreen.c +++ b/drivers/usb/input/usbtouchscreen.c | |||
@@ -61,7 +61,7 @@ struct usbtouch_device_info { | |||
61 | int rept_size; | 61 | int rept_size; |
62 | int flags; | 62 | int flags; |
63 | 63 | ||
64 | void (*process_pkt) (struct usbtouch_usb *usbtouch, struct pt_regs *regs, unsigned char *pkt, int len); | 64 | void (*process_pkt) (struct usbtouch_usb *usbtouch, unsigned char *pkt, int len); |
65 | int (*get_pkt_len) (unsigned char *pkt, int len); | 65 | int (*get_pkt_len) (unsigned char *pkt, int len); |
66 | int (*read_data) (unsigned char *pkt, int *x, int *y, int *touch, int *press); | 66 | int (*read_data) (unsigned char *pkt, int *x, int *y, int *touch, int *press); |
67 | int (*init) (struct usbtouch_usb *usbtouch); | 67 | int (*init) (struct usbtouch_usb *usbtouch); |
@@ -91,7 +91,6 @@ struct usbtouch_usb { | |||
91 | 91 | ||
92 | #ifdef MULTI_PACKET | 92 | #ifdef MULTI_PACKET |
93 | static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, | 93 | static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, |
94 | struct pt_regs *regs, | ||
95 | unsigned char *pkt, int len); | 94 | unsigned char *pkt, int len); |
96 | #endif | 95 | #endif |
97 | 96 | ||
@@ -397,7 +396,7 @@ static struct usbtouch_device_info usbtouch_dev_info[] = { | |||
397 | * Generic Part | 396 | * Generic Part |
398 | */ | 397 | */ |
399 | static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, | 398 | static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, |
400 | struct pt_regs *regs, unsigned char *pkt, int len) | 399 | unsigned char *pkt, int len) |
401 | { | 400 | { |
402 | int x, y, touch, press; | 401 | int x, y, touch, press; |
403 | struct usbtouch_device_info *type = usbtouch->type; | 402 | struct usbtouch_device_info *type = usbtouch->type; |
@@ -405,7 +404,6 @@ static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, | |||
405 | if (!type->read_data(pkt, &x, &y, &touch, &press)) | 404 | if (!type->read_data(pkt, &x, &y, &touch, &press)) |
406 | return; | 405 | return; |
407 | 406 | ||
408 | input_regs(usbtouch->input, regs); | ||
409 | input_report_key(usbtouch->input, BTN_TOUCH, touch); | 407 | input_report_key(usbtouch->input, BTN_TOUCH, touch); |
410 | 408 | ||
411 | if (swap_xy) { | 409 | if (swap_xy) { |
@@ -423,7 +421,6 @@ static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, | |||
423 | 421 | ||
424 | #ifdef MULTI_PACKET | 422 | #ifdef MULTI_PACKET |
425 | static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, | 423 | static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, |
426 | struct pt_regs *regs, | ||
427 | unsigned char *pkt, int len) | 424 | unsigned char *pkt, int len) |
428 | { | 425 | { |
429 | unsigned char *buffer; | 426 | unsigned char *buffer; |
@@ -460,7 +457,7 @@ static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, | |||
460 | if (usbtouch->buf_len + tmp >= usbtouch->type->rept_size) | 457 | if (usbtouch->buf_len + tmp >= usbtouch->type->rept_size) |
461 | goto out_flush_buf; | 458 | goto out_flush_buf; |
462 | memcpy(usbtouch->buffer + usbtouch->buf_len, pkt, tmp); | 459 | memcpy(usbtouch->buffer + usbtouch->buf_len, pkt, tmp); |
463 | usbtouch_process_pkt(usbtouch, regs, usbtouch->buffer, pkt_len); | 460 | usbtouch_process_pkt(usbtouch, usbtouch->buffer, pkt_len); |
464 | 461 | ||
465 | buffer = pkt + tmp; | 462 | buffer = pkt + tmp; |
466 | buf_len = len - tmp; | 463 | buf_len = len - tmp; |
@@ -481,7 +478,7 @@ static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, | |||
481 | 478 | ||
482 | /* full packet: process */ | 479 | /* full packet: process */ |
483 | if (likely((pkt_len > 0) && (pkt_len <= buf_len - pos))) { | 480 | if (likely((pkt_len > 0) && (pkt_len <= buf_len - pos))) { |
484 | usbtouch_process_pkt(usbtouch, regs, buffer + pos, pkt_len); | 481 | usbtouch_process_pkt(usbtouch, buffer + pos, pkt_len); |
485 | } else { | 482 | } else { |
486 | /* incomplete packet: save in buffer */ | 483 | /* incomplete packet: save in buffer */ |
487 | memcpy(usbtouch->buffer, buffer + pos, buf_len - pos); | 484 | memcpy(usbtouch->buffer, buffer + pos, buf_len - pos); |
@@ -498,7 +495,7 @@ out_flush_buf: | |||
498 | #endif | 495 | #endif |
499 | 496 | ||
500 | 497 | ||
501 | static void usbtouch_irq(struct urb *urb, struct pt_regs *regs) | 498 | static void usbtouch_irq(struct urb *urb) |
502 | { | 499 | { |
503 | struct usbtouch_usb *usbtouch = urb->context; | 500 | struct usbtouch_usb *usbtouch = urb->context; |
504 | int retval; | 501 | int retval; |
@@ -525,7 +522,7 @@ static void usbtouch_irq(struct urb *urb, struct pt_regs *regs) | |||
525 | goto exit; | 522 | goto exit; |
526 | } | 523 | } |
527 | 524 | ||
528 | usbtouch->type->process_pkt(usbtouch, regs, usbtouch->data, urb->actual_length); | 525 | usbtouch->type->process_pkt(usbtouch, usbtouch->data, urb->actual_length); |
529 | 526 | ||
530 | exit: | 527 | exit: |
531 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 528 | retval = usb_submit_urb(urb, GFP_ATOMIC); |