diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-09-10 10:34:00 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-09-15 11:02:14 +0200 |
commit | 610a407cdc5a8ab5358fb253b3c5457452ff1d75 (patch) | |
tree | eed3f70a60f9fcadd481dd9e4e1d6de63d92effa | |
parent | staging:iio:ad7476: Squash driver into a single file. (diff) | |
download | linux-610a407cdc5a8ab5358fb253b3c5457452ff1d75.tar.xz linux-610a407cdc5a8ab5358fb253b3c5457452ff1d75.zip |
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>
-rw-r--r-- | drivers/staging/iio/adc/ad7476.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/adc/ad7476.c b/drivers/staging/iio/adc/ad7476.c index 12e6e4b36a5f..a33a4066ebe2 100644 --- a/drivers/staging/iio/adc/ad7476.c +++ b/drivers/staging/iio/adc/ad7476.c @@ -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, |