staging:iio:ad7476: Use be16_to_cpup instead of open-coding it

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Lars-Peter Clausen 2012-09-10 09:34:00 +01:00 committed by Jonathan Cameron
parent 7a28fe3c93
commit 610a407cdc

View file

@ -83,7 +83,7 @@ static int ad7476_scan_direct(struct ad7476_state *st)
if (ret)
return ret;
return (st->data[0] << 8) | st->data[1];
return be16_to_cpup((__be16 *)st->data);
}
static int ad7476_read_raw(struct iio_dev *indio_dev,