iio: imu: adis16400: Fix sign extension
The intention is obviously to sign-extend a 12 bit quantity. But because of C's promotion rules, the assignment is equivalent to "val16 &= 0xfff;". Use the proper API for this. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Cc: Stable@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
Showing
想要评论请 注册 或 登录