diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2011-02-25 12:33:13 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-02-27 04:48:30 -0500 |
commit | 5063511539bbb436ae8e4f75409561ef547f8516 (patch) | |
tree | c1418aacceda9dc4933bbeb93a332cc7c9fe8d54 /drivers | |
parent | 1d64b655dc083df5c5ac39945ccbbc6532903bf1 (diff) |
Input: bcm5974 - Report button also for zero fingers
With the current code, pressing the integrated button with an
isolating tool does not result in any button report. Fixed
with this this patch.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index b95231763911..d24837210f04 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -390,10 +390,6 @@ static int report_tp_state(struct bcm5974 *dev, int size) | |||
390 | ptest = int2bound(&c->p, raw_p); | 390 | ptest = int2bound(&c->p, raw_p); |
391 | origin = raw2int(f->origin); | 391 | origin = raw2int(f->origin); |
392 | 392 | ||
393 | /* set the integrated button if applicable */ | ||
394 | if (c->tp_type == TYPE2) | ||
395 | ibt = raw2int(dev->tp_data[BUTTON_TYPE2]); | ||
396 | |||
397 | /* while tracking finger still valid, count all fingers */ | 393 | /* while tracking finger still valid, count all fingers */ |
398 | if (ptest > PRESSURE_LOW && origin) { | 394 | if (ptest > PRESSURE_LOW && origin) { |
399 | abs_p = ptest; | 395 | abs_p = ptest; |
@@ -412,6 +408,10 @@ static int report_tp_state(struct bcm5974 *dev, int size) | |||
412 | } | 408 | } |
413 | } | 409 | } |
414 | 410 | ||
411 | /* set the integrated button if applicable */ | ||
412 | if (c->tp_type == TYPE2) | ||
413 | ibt = raw2int(dev->tp_data[BUTTON_TYPE2]); | ||
414 | |||
415 | if (dev->fingers < nmin) | 415 | if (dev->fingers < nmin) |
416 | dev->fingers = nmin; | 416 | dev->fingers = nmin; |
417 | if (dev->fingers > nmax) | 417 | if (dev->fingers > nmax) |