Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: mlx90614: Convert to common field_{get,prep}() helpers

Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Crt Mori <cmo@melexis.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>

authored by

Geert Uytterhoeven and committed by
Yury Norov (NVIDIA)
1fe1c28a 54bfd90c

+1 -6
+1 -6
drivers/iio/temperature/mlx90614.c
··· 22 22 * the "wakeup" GPIO is not given, power management will be disabled. 23 23 */ 24 24 25 + #include <linux/bitfield.h> 25 26 #include <linux/delay.h> 26 27 #include <linux/err.h> 27 28 #include <linux/gpio/consumer.h> ··· 68 67 #define MLX90614_CONST_OFFSET_REM 500000 /* remainder of offset (273.15*50) */ 69 68 #define MLX90614_CONST_SCALE 20 /* Scale in milliKelvin (0.02 * 1000) */ 70 69 #define MLX90614_CONST_FIR 0x7 /* Fixed value for FIR part of low pass filter */ 71 - 72 - /* Non-constant mask variant of FIELD_GET() and FIELD_PREP() */ 73 - #undef field_get 74 - #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1)) 75 - #undef field_prep 76 - #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask)) 77 70 78 71 struct mlx_chip_info { 79 72 /* EEPROM offsets with 16-bit data, MSB first */