Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit b0d713c6 authored by Maximilian Luz's avatar Maximilian Luz Committed by Jiri Kosina
Browse files

HID: surface-hid: Fix integer endian conversion


We want to convert from 16 bit (unsigned) little endian values contained
in a packed struct to CPU native endian values here, not the other way
around. So replace cpu_to_le16() with get_unaligned_le16(), using the
latter instead of le16_to_cpu() to acknowledge that we are reading from
a packed struct.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Fixes: b05ff100

 ("HID: Add support for Surface Aggregator Module HID transport")
Signed-off-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 0f0fb3d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment