summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorMartin Kepplinger <martink@posteo.de>2017-04-04 10:06:57 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-04-05 08:52:36 -0700
commitdd04dc6dbd7f32b904c3b9916f5eb6be6fc2bb58 (patch)
tree000e6f95fa7c13ca8ed3538758ce445d5b1dd1a2 /drivers/input/touchscreen
parentd99caa472c0a28dc95dd9b98c30ee46f9755181f (diff)
Input: sur40 - fix bad endianness handling in sur40_poll
sparse says: sur40.c:372:40: warning: restricted __le32 degrades to integer the header's data is __le32 so we need to convert it before comparing. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/sur40.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
index 4c0eecae065c..128e5bd74720 100644
--- a/drivers/input/touchscreen/sur40.c
+++ b/drivers/input/touchscreen/sur40.c
@@ -369,7 +369,7 @@ static void sur40_poll(struct input_polled_dev *polldev)
* packet ID will usually increase in the middle of a series
* instead of at the end.
*/
- if (packet_id != header->packet_id)
+ if (packet_id != le32_to_cpu(header->packet_id))
dev_dbg(sur40->dev, "packet ID mismatch\n");
packet_blobs = result / sizeof(struct sur40_blob);