]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: dac: Convert to common field_prep() helper
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Nov 2025 13:34:06 +0000 (14:34 +0100)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Mon, 24 Nov 2025 19:15:47 +0000 (14:15 -0500)
Drop the driver-specific field_prep() macro, in favor of the globally
available variant from <linux/bitfield.h>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
drivers/iio/dac/ad3530r.c

index 5684d11137f299488fff7092de2fbea6ae02b586..b97b46090d808ee7835d7b19abf8d611b0cbb025 100644 (file)
 #define AD3530R_MAX_CHANNELS                   8
 #define AD3531R_MAX_CHANNELS                   4
 
-/* Non-constant mask variant of FIELD_PREP() */
-#undef field_prep
-#define field_prep(_mask, _val)        (((_val) << (ffs(_mask) - 1)) & (_mask))
-
 enum ad3530r_mode {
        AD3530R_NORMAL_OP,
        AD3530R_POWERDOWN_1K,