staging:iio:adxrs450: Perform sign extension for the calibbias register
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 31 Jan 2013 14:27:00 +0000 (14:27 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 2 Feb 2013 09:20:56 +0000 (09:20 +0000)
commitc62b89c713ebd5e4a67c9b9229591adab8953a3c
tree82c993afa7364bd28184948dc24f16e2c51bb826
parent1a87e4fba63cd82d74f23b6e0b75ad6b01b15774
staging:iio:adxrs450: Perform sign extension for the calibbias register

The calibbias (DNC) register contains a 10-bit twos complement value. Perform a
proper sign extension when reading the register, otherwise negative will
incorrectly be displayed 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/adxrs450_core.c