iio: adc: ad7192: Use bitfield access macros
authorAlisa-Dariana Roman <alisa.roman@analog.com>
Sun, 24 Sep 2023 21:51:46 +0000 (00:51 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 5 Oct 2023 13:44:06 +0000 (14:44 +0100)
commit874bbd1219c70b0d14881214c9768a0e4598fad5
treefe57351f90967c42d75c06af6255068e33fe17df
parent3b4e0e9677551806766a1ffd19a4a365c10f43d9
iio: adc: ad7192: Use bitfield access macros

Include bitfield.h and update driver to use bitfield access macros GENMASK,
FIELD_PREP and FIELD_GET.

Remove old macros in favor of using FIELD_PREP and masks.

Change %d to %ld to match the type of FIELD_GET().

Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Link: https://lore.kernel.org/r/20230924215148.102491-2-alisadariana@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7192.c