aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2025-11-06 14:33:49 +0100
committerYury Norov (NVIDIA) <yury.norov@gmail.com>2025-11-24 14:15:46 -0500
commitdbfe51513aae6bace00cc390e11cb486a64a63d2 (patch)
treee90f0291f92edcf7b2fc8b33f356320343a2ca04 /drivers/clk
parentd1cadd4bfc2802c6f73b1739dbceef7513afc591 (diff)
downloadtip-dbfe51513aae6bace00cc390e11cb486a64a63d2.tar.gz
clk: at91: pmc: #undef field_{get,prep}() before 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: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/at91/pmc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
index 5daa32c4cf2540..78a87d31463e98 100644
--- a/drivers/clk/at91/pmc.h
+++ b/drivers/clk/at91/pmc.h
@@ -117,7 +117,9 @@ struct at91_clk_pms {
unsigned int parent;
};
+#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 ndck(a, s) (a[s - 1].id + 1)