]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iio: dac: ad3530r: #undef field_prep() before local definition
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Nov 2025 13:33:53 +0000 (14:33 +0100)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Mon, 24 Nov 2025 19:15:46 +0000 (14:15 -0500)
Prepare for the advent of a globally available common field_prep() macro
by undefining the symbol before defining a local variant.  This prevents
redefinition warnings from the C preprocessor when introducing the common
macro later.

Suggested-by: Yury Norov <yury.norov@gmail.com>
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 6134613777b8e1d4516109b74e0b3b79edb1ae75..5684d11137f299488fff7092de2fbea6ae02b586 100644 (file)
@@ -54,6 +54,7 @@
 #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 {