mtd: rawnand: sunxi: #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>
This commit is contained in:
Geert Uytterhoeven 2025-11-06 14:33:59 +01:00 committed by Miquel Raynal
parent b98994cb9b
commit c67c7ee7d5
1 changed files with 2 additions and 0 deletions

View File

@ -30,7 +30,9 @@
#include <linux/reset.h>
/* non compile-time field get/prep */
#undef field_get
#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
#undef field_prep
#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
#define NFC_REG_CTL 0x0000