Skip to content

Commit bb0e7fd

Browse files
geertuYuryNorov
authored andcommitted
pinctrl: ma35: Convert to common field_{get,prep}() helpers
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>
1 parent 1fe1c28 commit bb0e7fd

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

drivers/pinctrl/nuvoton/pinctrl-ma35.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,6 @@
8181
#define MVOLT_1800 0
8282
#define MVOLT_3300 1
8383

84-
/* Non-constant mask variant of FIELD_GET() and FIELD_PREP() */
85-
#undef field_get
86-
#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
87-
#undef field_prep
88-
#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
89-
9084
static const char * const gpio_group_name[] = {
9185
"gpioa", "gpiob", "gpioc", "gpiod", "gpioe", "gpiof", "gpiog",
9286
"gpioh", "gpioi", "gpioj", "gpiok", "gpiol", "gpiom", "gpion",

0 commit comments

Comments
 (0)