]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
pinctrl: ma35: Convert to common field_{get,prep}() helpers
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Nov 2025 13:34:08 +0000 (14:34 +0100)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Mon, 24 Nov 2025 19:15:47 +0000 (14:15 -0500)
Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
drivers/pinctrl/nuvoton/pinctrl-ma35.c

index 925dd717c9deead524a2730a71ad9d7d3171f164..8d71dc53cc1de1f88de58952f3a4c96b7580eb8a 100644 (file)
 #define MVOLT_1800                     0
 #define MVOLT_3300                     1
 
-/* Non-constant mask variant of FIELD_GET() and FIELD_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))
-
 static const char * const gpio_group_name[] = {
        "gpioa", "gpiob", "gpioc", "gpiod", "gpioe", "gpiof", "gpiog",
        "gpioh", "gpioi", "gpioj", "gpiok", "gpiol", "gpiom", "gpion",