aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/mouse/lifebook.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c
index 15ac3205ac05..dcd4236af1e3 100644
--- a/drivers/input/mouse/lifebook.c
+++ b/drivers/input/mouse/lifebook.c
@@ -159,21 +159,22 @@ static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse)
159 if (!dev2) 159 if (!dev2)
160 printk(KERN_WARNING "lifebook.c: got relative packet " 160 printk(KERN_WARNING "lifebook.c: got relative packet "
161 "but no relative device set up\n"); 161 "but no relative device set up\n");
162 } else if (lifebook_use_6byte_proto) {
163 input_report_abs(dev1, ABS_X,
164 ((packet[1] & 0x3f) << 6) | (packet[2] & 0x3f));
165 input_report_abs(dev1, ABS_Y,
166 4096 - (((packet[4] & 0x3f) << 6) | (packet[5] & 0x3f)));
167 } else { 162 } else {
168 input_report_abs(dev1, ABS_X, 163 if (lifebook_use_6byte_proto) {
169 (packet[1] | ((packet[0] & 0x30) << 4))); 164 input_report_abs(dev1, ABS_X,
170 input_report_abs(dev1, ABS_Y, 165 ((packet[1] & 0x3f) << 6) | (packet[2] & 0x3f));
171 1024 - (packet[2] | ((packet[0] & 0xC0) << 2))); 166 input_report_abs(dev1, ABS_Y,
167 4096 - (((packet[4] & 0x3f) << 6) | (packet[5] & 0x3f)));
168 } else {
169 input_report_abs(dev1, ABS_X,
170 (packet[1] | ((packet[0] & 0x30) << 4)));
171 input_report_abs(dev1, ABS_Y,
172 1024 - (packet[2] | ((packet[0] & 0xC0) << 2)));
173 }
174 input_report_key(dev1, BTN_TOUCH, packet[0] & 0x04);
175 input_sync(dev1);
172 } 176 }
173 177
174 input_report_key(dev1, BTN_TOUCH, packet[0] & 0x04);
175 input_sync(dev1);
176
177 if (dev2) { 178 if (dev2) {
178 if (relative_packet) { 179 if (relative_packet) {
179 input_report_rel(dev2, REL_X, 180 input_report_rel(dev2, REL_X,