aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mouse/bcm5974.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 17:56:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 17:56:51 -0700
commit133309a89e7430f907ebe85e78906ee12c311727 (patch)
treedaa96e6e82b63c0ef1538dcbb455d13595a1c83d /drivers/input/mouse/bcm5974.c
parent5489375d481c8456c8259b48e107d03b05309d1d (diff)
parentfc8e1ead9314cf0e0f1922e661428b93d3a50d88 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (52 commits) Input: bcm5974 - silence uninitialized variables warnings Input: wistron_btns - add keymap for AOpen 1557 Input: psmouse - use boolean type Input: i8042 - use platform_driver_probe Input: i8042 - use boolean type where it makes sense Input: i8042 - try disabling and re-enabling AUX port at close Input: pxa27x_keypad - allow modifying keymap from userspace Input: sunkbd - fix formatting Input: i8042 - bypass AUX IRQ delivery test on laptops Input: wacom_w8001 - simplify querying logic Input: atkbd - allow setting force-release bitmap via sysfs Input: w90p910_keypad - move a dereference below a NULL test Input: add twl4030_keypad driver Input: matrix-keypad - add function to build device keymap Input: tosakbd - fix cleaning up KEY_STROBEs after error Input: joydev - validate axis/button maps before clobbering current ones Input: xpad - add USB ID for the drumkit controller from Rock Band Input: w90p910_keypad - rename driver name to match platform Input: add new driver for Sentelic Finger Sensing Pad Input: psmouse - allow defining read-only attributes ...
Diffstat (limited to 'drivers/input/mouse/bcm5974.c')
-rw-r--r--drivers/input/mouse/bcm5974.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 2d8fc0bf692..0d1d33468b4 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)
const struct tp_finger *f;
struct input_dev *input = dev->input;
int raw_p, raw_w, raw_x, raw_y, raw_n;
- int ptest = 0, origin = 0, ibt = 0, nmin = 0, nmax = 0;
+ int ptest, origin, ibt = 0, nmin = 0, nmax = 0;
int abs_p = 0, abs_w = 0, abs_x = 0, abs_y = 0;
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)
/* set the integrated button if applicable */
if (c->tp_type == TYPE2)
ibt = raw2int(dev->tp_data[BUTTON_TYPE2]);
- }
- /* while tracking finger still valid, count all fingers */
- if (ptest > PRESSURE_LOW && origin) {
- abs_p = ptest;
- abs_w = int2bound(&c->w, raw_w);
- abs_x = int2bound(&c->x, raw_x - c->x.devmin);
- abs_y = int2bound(&c->y, c->y.devmax - raw_y);
- while (raw_n--) {
- ptest = int2bound(&c->p, raw2int(f->force_major));
- if (ptest > PRESSURE_LOW)
- nmax++;
- if (ptest > PRESSURE_HIGH)
- nmin++;
- f++;
+ /* while tracking finger still valid, count all fingers */
+ if (ptest > PRESSURE_LOW && origin) {
+ abs_p = ptest;
+ abs_w = int2bound(&c->w, raw_w);
+ abs_x = int2bound(&c->x, raw_x - c->x.devmin);
+ abs_y = int2bound(&c->y, c->y.devmax - raw_y);
+ while (raw_n--) {
+ ptest = int2bound(&c->p,
+ raw2int(f->force_major));
+ if (ptest > PRESSURE_LOW)
+ nmax++;
+ if (ptest > PRESSURE_HIGH)
+ nmin++;
+ f++;
+ }
}
}