Skip to content

Commit 27856d2

Browse files
geertuYuryNorov
authored andcommitted
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>
1 parent d1e1a72 commit 27856d2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/iio/dac/ad3530r.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#define AD3531R_MAX_CHANNELS 4
5555

5656
/* Non-constant mask variant of FIELD_PREP() */
57+
#undef field_prep
5758
#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
5859

5960
enum ad3530r_mode {

0 commit comments

Comments
 (0)