From: Rasmus Villemoes Date: Thu, 22 Jan 2015 23:34:02 +0000 (+0100) Subject: iio: imu: adis16400: Fix sign extension X-Git-Tag: v3.2.69~203 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=486b2b811cd5ba7f51498cd99105bcd3a3d39f9d;p=pandora-kernel.git iio: imu: adis16400: Fix sign extension commit 19e353f2b344ad86cea6ebbc0002e5f903480a90 upstream. 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: Rasmus Villemoes Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron [bwh: Backported to 3.2: adjust filename, context] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed