diff options
author | Ricardo Ribalda <ribalda@chromium.org> | 2024-04-15 23:53:03 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-04-16 01:21:44 +0200 |
commit | ba2ec9c4f0c8ab59befc7f62e1606a840347f020 (patch) | |
tree | 61b5aece655037210f392766eb2be75942cbb998 /drivers/input | |
parent | Input: adafruit-seesaw - only report buttons that changed state (diff) | |
download | linux-ba2ec9c4f0c8ab59befc7f62e1606a840347f020.tar.xz linux-ba2ec9c4f0c8ab59befc7f62e1606a840347f020.zip |
Input: sur40 - convert le16 to cpu before use
Smatch found this issue:
drivers/input/touchscreen/sur40.c:424:55: warning: incorrect type in argument 2 (different base types)
drivers/input/touchscreen/sur40.c:424:55: expected int key
drivers/input/touchscreen/sur40.c:424:55: got restricted __le16 [usertype] blob_id
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://lore.kernel.org/r/20240410-smatch-v1-6-785d009a852b@chromium.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/sur40.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 8ddb3f7d307a..cba6f5015106 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -421,7 +421,7 @@ static void sur40_report_blob(struct sur40_blob *blob, struct input_dev *input) if (blob->type != SUR40_TOUCH) return; - slotnum = input_mt_get_slot_by_key(input, blob->blob_id); + slotnum = input_mt_get_slot_by_key(input, le16_to_cpu(blob->blob_id)); if (slotnum < 0 || slotnum >= MAX_CONTACTS) return; |