staging: iio: ad2s1200: Improve readability with be16_to_cpup
authorDavid Veenstra <davidjulianveenstra@gmail.com>
Sun, 22 Apr 2018 22:03:03 +0000 (00:03 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Apr 2018 17:12:03 +0000 (18:12 +0100)
commit0bd3d338f61b957650700e3113fd9c7f49103570
tree394ca9acf8aa02e63213690596f1aadddaca071c
parent8b74816b5a9adac4629f0f072c122d57b8f0eb78
staging: iio: ad2s1200: Improve readability with be16_to_cpup

The manual states that the data is contained in the upper 12 bits
of the 16 bits read by spi. The code that extracts these 12 bits
is correct for both be and le machines, but this is not clear
from a first glance.

To improve readability the relevant expressions are replaced
with equivalent expressions that use be16_to_cpup.

Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/resolver/ad2s1200.c