From: Lars-Peter Clausen Date: Mon, 10 Sep 2012 08:34:00 +0000 (+0100) Subject: staging:iio:ad7476: Use be16_to_cpup instead of open-coding it X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=610a407cdc5a8ab5358fb253b3c5457452ff1d75;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging:iio:ad7476: Use be16_to_cpup instead of open-coding it Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- 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,