summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-05-17 00:33:21 +0200
committerKlaus Goger <klaus.goger@theobroma-systems.com>2017-05-24 11:35:10 +0200
commitf747e0672f16fcd02d63791b9da645f3554acde1 (patch)
treebbddc8d78f74dde8d8e54380161f68c7749d73cc
parentacbd9a95c687b5be22dc366dc5f22d31207455c0 (diff)
Input: back-port silead.c: pos[i] handling/assignment
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
-rw-r--r--drivers/input/touchscreen/silead.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
index 2980a9d41008..580232769690 100644
--- a/drivers/input/touchscreen/silead.c
+++ b/drivers/input/touchscreen/silead.c
@@ -74,7 +74,6 @@ struct silead_ts_data {
struct gpio_desc *gpio_power;
struct input_dev *input;
char fw_name[64];
- struct touchscreen_properties prop;
u32 max_fingers;
u32 chip_id;
struct input_mt_pos pos[SILEAD_MAX_FINGERS];
@@ -101,7 +100,7 @@ static int silead_ts_request_input_dev(struct silead_ts_data *data)
input_set_abs_params(data->input, ABS_MT_POSITION_X, 0, 4095, 0, 0);
input_set_abs_params(data->input, ABS_MT_POSITION_Y, 0, 4095, 0, 0);
- touchscreen_parse_properties(data->input, true, &data->prop);
+ touchscreen_parse_properties(data->input, true);
input_mt_init_slots(data->input, data->max_fingers,
INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED |
@@ -158,9 +157,11 @@ static void silead_ts_read_data(struct i2c_client *client)
/* Bits 4-7 are the touch id */
data->id[i] = (bufp[SILEAD_POINT_X_MSB_OFF] &
SILEAD_TOUCH_ID_MASK) >> 4;
- touchscreen_set_mt_pos(&data->pos[i], &data->prop,
- get_unaligned_le16(&bufp[SILEAD_POINT_X_OFF]) & 0xfff,
- get_unaligned_le16(&bufp[SILEAD_POINT_Y_OFF]) & 0xfff);
+
+ data->pos[i].x =
+ get_unaligned_le16(&bufp[SILEAD_POINT_X_OFF]) & 0xfff;
+ data->pos[i].y =
+ get_unaligned_le16(&bufp[SILEAD_POINT_Y_OFF]) & 0xfff;
}
input_mt_assign_slots(input, data->slots, data->pos, touch_nr, 0);