]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: intel_mrfld_adc: Use be16_to_cpu() instead of get_unaligned_be16()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 11 Mar 2020 09:22:23 +0000 (11:22 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Mar 2020 10:27:23 +0000 (10:27 +0000)
commitf7503fac600be428eafccad55c53979650dafc2a
treedea15b7183556c013a329580d85ade807e874111
parent0a02b90ad4449034f909f4f8cc2b5e1b100f8278
iio: adc: intel_mrfld_adc: Use be16_to_cpu() instead of get_unaligned_be16()

There is no need to call unaligned helpers on stack placed variables
because compiler will align them correctly, accordingly to architectural
ABI. Moreover, using bitwise type makes it explicit to see what we are
reading in bulk transfer. On top of that, use sizeof() instead of
magic value.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/intel_mrfld_adc.c