aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/touchkitusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/touchkitusb.c')
-rw-r--r--drivers/usb/input/touchkitusb.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c
index 30b9f820e7a8..05c0d1ca39ab 100644
--- a/drivers/usb/input/touchkitusb.c
+++ b/drivers/usb/input/touchkitusb.c
@@ -92,8 +92,7 @@ static inline int touchkit_get_y(char *data)
92 92
93 93
94/* processes one input packet. */ 94/* processes one input packet. */
95static void touchkit_process_pkt(struct touchkit_usb *touchkit, 95static void touchkit_process_pkt(struct touchkit_usb *touchkit, char *pkt)
96 struct pt_regs *regs, char *pkt)
97{ 96{
98 int x, y; 97 int x, y;
99 98
@@ -109,7 +108,6 @@ static void touchkit_process_pkt(struct touchkit_usb *touchkit,
109 y = touchkit_get_y(pkt); 108 y = touchkit_get_y(pkt);
110 } 109 }
111 110
112 input_regs(touchkit->input, regs);
113 input_report_key(touchkit->input, BTN_TOUCH, touchkit_get_touched(pkt)); 111 input_report_key(touchkit->input, BTN_TOUCH, touchkit_get_touched(pkt));
114 input_report_abs(touchkit->input, ABS_X, x); 112 input_report_abs(touchkit->input, ABS_X, x);
115 input_report_abs(touchkit->input, ABS_Y, y); 113 input_report_abs(touchkit->input, ABS_Y, y);
@@ -130,8 +128,7 @@ static int touchkit_get_pkt_len(char *buf)
130 return 0; 128 return 0;
131} 129}
132 130
133static void touchkit_process(struct touchkit_usb *touchkit, int len, 131static void touchkit_process(struct touchkit_usb *touchkit, int len)
134 struct pt_regs *regs)
135{ 132{
136 char *buffer; 133 char *buffer;
137 int pkt_len, buf_len, pos; 134 int pkt_len, buf_len, pos;
@@ -153,7 +150,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len,
153 /* append, process */ 150 /* append, process */
154 tmp = pkt_len - touchkit->buf_len; 151 tmp = pkt_len - touchkit->buf_len;
155 memcpy(touchkit->buffer + touchkit->buf_len, touchkit->data, tmp); 152 memcpy(touchkit->buffer + touchkit->buf_len, touchkit->data, tmp);
156 touchkit_process_pkt(touchkit, regs, touchkit->buffer); 153 touchkit_process_pkt(touchkit, touchkit->buffer);
157 154
158 buffer = touchkit->data + tmp; 155 buffer = touchkit->data + tmp;
159 buf_len = len - tmp; 156 buf_len = len - tmp;
@@ -181,7 +178,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len,
181 178
182 /* full packet: process */ 179 /* full packet: process */
183 if (likely(pkt_len <= buf_len)) { 180 if (likely(pkt_len <= buf_len)) {
184 touchkit_process_pkt(touchkit, regs, buffer + pos); 181 touchkit_process_pkt(touchkit, buffer + pos);
185 } else { 182 } else {
186 /* incomplete packet: save in buffer */ 183 /* incomplete packet: save in buffer */
187 memcpy(touchkit->buffer, buffer + pos, buf_len - pos); 184 memcpy(touchkit->buffer, buffer + pos, buf_len - pos);
@@ -192,7 +189,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len,
192} 189}
193 190
194 191
195static void touchkit_irq(struct urb *urb, struct pt_regs *regs) 192static void touchkit_irq(struct urb *urb)
196{ 193{
197 struct touchkit_usb *touchkit = urb->context; 194 struct touchkit_usb *touchkit = urb->context;
198 int retval; 195 int retval;
@@ -219,7 +216,7 @@ static void touchkit_irq(struct urb *urb, struct pt_regs *regs)
219 goto exit; 216 goto exit;
220 } 217 }
221 218
222 touchkit_process(touchkit, urb->actual_length, regs); 219 touchkit_process(touchkit, urb->actual_length);
223 220
224exit: 221exit:
225 retval = usb_submit_urb(urb, GFP_ATOMIC); 222 retval = usb_submit_urb(urb, GFP_ATOMIC);