staging:iio:adis16080: Perform sign extension
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 9 Jan 2013 14:01:00 +0000 (14:01 +0000)
committerJonathan Cameron <jic23@kernel.org>
Wed, 9 Jan 2013 21:15:33 +0000 (21:15 +0000)
commita02a8c42b588059aa06dff6f614a7afcba12df69
tree38dc5486e08fdfe602c369f4f3db833700ee6b3e
parent7b7a4efe76a8a96b20f7ac8047869f43e65b10e4
staging:iio:adis16080: Perform sign extension

The adis16080 reports sample values in twos complement. So we need to perform a
sign extension on the result, otherwise negative values will be reported
incorrectly as large positive values.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/gyro/adis16080_core.c