Skip to content

Commit 2fc00c0

Browse files
geertuYuryNorov
authored andcommitted
pinctrl: ma35: #undef field_{get,prep}() before local definition
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Suggested-by: Yury Norov <yury.norov@gmail.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
1 parent 8a838da commit 2fc00c0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/pinctrl/nuvoton/pinctrl-ma35.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@
8282
#define MVOLT_3300 1
8383

8484
/* Non-constant mask variant of FIELD_GET() and FIELD_PREP() */
85+
#undef field_get
8586
#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
87+
#undef field_prep
8688
#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
8789

8890
static const char * const gpio_group_name[] = {

0 commit comments

Comments
 (0)