diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-09-16 00:48:32 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-09-16 00:48:32 -0400 |
commit | ea88023b3491a384575ebcd5e8a449e841a28a24 (patch) | |
tree | f46e3d8302e44dc55ce31823501e100472d29683 /drivers/input/mouse/bcm5974.c | |
parent | a6f15ade97989d414e9bf33874c9d5d1f39808ec (diff) | |
parent | 0cb583fd2862f19ea88b02eb307d11c09e51e2f8 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/sh/kernel/vmlinux.lds.S
Diffstat (limited to 'drivers/input/mouse/bcm5974.c')
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index 2d8fc0bf6923..0d1d33468b43 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -317,7 +317,7 @@ static int report_tp_state(struct bcm5974 *dev, int size) | |||
317 | const struct tp_finger *f; | 317 | const struct tp_finger *f; |
318 | struct input_dev *input = dev->input; | 318 | struct input_dev *input = dev->input; |
319 | int raw_p, raw_w, raw_x, raw_y, raw_n; | 319 | int raw_p, raw_w, raw_x, raw_y, raw_n; |
320 | int ptest = 0, origin = 0, ibt = 0, nmin = 0, nmax = 0; | 320 | int ptest, origin, ibt = 0, nmin = 0, nmax = 0; |
321 | int abs_p = 0, abs_w = 0, abs_x = 0, abs_y = 0; | 321 | int abs_p = 0, abs_w = 0, abs_x = 0, abs_y = 0; |
322 | 322 | ||
323 | if (size < c->tp_offset || (size - c->tp_offset) % SIZEOF_FINGER != 0) | 323 | if (size < c->tp_offset || (size - c->tp_offset) % SIZEOF_FINGER != 0) |
@@ -345,21 +345,22 @@ static int report_tp_state(struct bcm5974 *dev, int size) | |||
345 | /* set the integrated button if applicable */ | 345 | /* set the integrated button if applicable */ |
346 | if (c->tp_type == TYPE2) | 346 | if (c->tp_type == TYPE2) |
347 | ibt = raw2int(dev->tp_data[BUTTON_TYPE2]); | 347 | ibt = raw2int(dev->tp_data[BUTTON_TYPE2]); |
348 | } | ||
349 | 348 | ||
350 | /* while tracking finger still valid, count all fingers */ | 349 | /* while tracking finger still valid, count all fingers */ |
351 | if (ptest > PRESSURE_LOW && origin) { | 350 | if (ptest > PRESSURE_LOW && origin) { |
352 | abs_p = ptest; | 351 | abs_p = ptest; |
353 | abs_w = int2bound(&c->w, raw_w); | 352 | abs_w = int2bound(&c->w, raw_w); |
354 | abs_x = int2bound(&c->x, raw_x - c->x.devmin); | 353 | abs_x = int2bound(&c->x, raw_x - c->x.devmin); |
355 | abs_y = int2bound(&c->y, c->y.devmax - raw_y); | 354 | abs_y = int2bound(&c->y, c->y.devmax - raw_y); |
356 | while (raw_n--) { | 355 | while (raw_n--) { |
357 | ptest = int2bound(&c->p, raw2int(f->force_major)); | 356 | ptest = int2bound(&c->p, |
358 | if (ptest > PRESSURE_LOW) | 357 | raw2int(f->force_major)); |
359 | nmax++; | 358 | if (ptest > PRESSURE_LOW) |
360 | if (ptest > PRESSURE_HIGH) | 359 | nmax++; |
361 | nmin++; | 360 | if (ptest > PRESSURE_HIGH) |
362 | f++; | 361 | nmin++; |
362 | f++; | ||
363 | } | ||
363 | } | 364 | } |
364 | } | 365 | } |
365 | 366 | ||