diff options
| -rw-r--r-- | drivers/input/touchscreen/ad7877.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 96c0a0d4b69c..b7de78e82737 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c | |||
| @@ -360,6 +360,13 @@ static int ad7877_rx(struct ad7877 *ts) | |||
| 360 | Rt /= z1; | 360 | Rt /= z1; |
| 361 | Rt = (Rt + 2047) >> 12; | 361 | Rt = (Rt + 2047) >> 12; |
| 362 | 362 | ||
| 363 | /* | ||
| 364 | * Sample found inconsistent, pressure is beyond | ||
| 365 | * the maximum. Don't report it to user space. | ||
| 366 | */ | ||
| 367 | if (Rt > ts->pressure_max) | ||
| 368 | return -EINVAL; | ||
| 369 | |||
| 363 | if (!timer_pending(&ts->timer)) | 370 | if (!timer_pending(&ts->timer)) |
| 364 | input_report_key(input_dev, BTN_TOUCH, 1); | 371 | input_report_key(input_dev, BTN_TOUCH, 1); |
| 365 | 372 | ||
