From: Peter Meerwald Date: Sat, 2 Nov 2013 19:44:00 +0000 (+0000) Subject: iio: Fix sign extension table in mcp3422 driver X-Git-Tag: v3.13-rc2~16^2~4^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5a3e43111e145aaaec4c60c927a8155b875890a;p=pandora-kernel.git iio: Fix sign extension table in mcp3422 driver the index argument to sign_extend32() gives the bit position (from 0) to the sign bit so e.g. if the measurement has 16-bit resolution, we need to pass 15; a measurement of 0x8000 should be reported as -32768, not 32768 Signed-off-by: Peter Meerwald Acked-by: Angelo Compagnucci Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed