diff options
Diffstat (limited to 'drivers/input/touchscreen/edt-ft5x06.c')
| -rw-r--r-- | drivers/input/touchscreen/edt-ft5x06.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index b06a5e3a665e..099d144ab7c9 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c | |||
| @@ -566,9 +566,12 @@ static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file, | |||
| 566 | } | 566 | } |
| 567 | 567 | ||
| 568 | read = min_t(size_t, count, tsdata->raw_bufsize - *off); | 568 | read = min_t(size_t, count, tsdata->raw_bufsize - *off); |
| 569 | error = copy_to_user(buf, tsdata->raw_buffer + *off, read); | 569 | if (copy_to_user(buf, tsdata->raw_buffer + *off, read)) { |
| 570 | if (!error) | 570 | error = -EFAULT; |
| 571 | *off += read; | 571 | goto out; |
| 572 | } | ||
| 573 | |||
| 574 | *off += read; | ||
| 572 | out: | 575 | out: |
| 573 | mutex_unlock(&tsdata->mutex); | 576 | mutex_unlock(&tsdata->mutex); |
| 574 | return error ?: read; | 577 | return error ?: read; |
| @@ -779,7 +782,7 @@ static int __devinit edt_ft5x06_ts_probe(struct i2c_client *client, | |||
| 779 | 0, tsdata->num_x * 64 - 1, 0, 0); | 782 | 0, tsdata->num_x * 64 - 1, 0, 0); |
| 780 | input_set_abs_params(input, ABS_MT_POSITION_Y, | 783 | input_set_abs_params(input, ABS_MT_POSITION_Y, |
| 781 | 0, tsdata->num_y * 64 - 1, 0, 0); | 784 | 0, tsdata->num_y * 64 - 1, 0, 0); |
| 782 | error = input_mt_init_slots(input, MAX_SUPPORT_POINTS); | 785 | error = input_mt_init_slots(input, MAX_SUPPORT_POINTS, 0); |
| 783 | if (error) { | 786 | if (error) { |
| 784 | dev_err(&client->dev, "Unable to init MT slots.\n"); | 787 | dev_err(&client->dev, "Unable to init MT slots.\n"); |
| 785 | goto err_free_mem; | 788 | goto err_free_mem; |
