iio: dac: ad3530r: #undef field_prep() before local definition

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>
This commit is contained in:
Geert Uytterhoeven 2025-11-06 14:33:53 +01:00 committed by Yury Norov (NVIDIA)
parent d1e1a7271e
commit 27856d2b2b

View 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 {