diff options
| author | Geert Uytterhoeven <geert+renesas@glider.be> | 2025-11-06 14:34:05 +0100 |
|---|---|---|
| committer | Yury Norov (NVIDIA) <yury.norov@gmail.com> | 2025-11-24 14:15:47 -0500 |
| commit | 2ef26ba8192c6ef49dd9ed1a95f990c438085517 (patch) | |
| tree | 54e54752b134f1225ac3421e75a62ac13ed664ea | |
| parent | 331a1457d8d5d233435633fcea116abeb775c4b4 (diff) | |
gpio: aspeed: 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>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
| -rw-r--r-- | drivers/gpio/gpio-aspeed.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index ef4ccaf74a5b..3da999334971 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -5,6 +5,7 @@ * Joel Stanley <joel@jms.id.au> */ +#include <linux/bitfield.h> #include <linux/cleanup.h> #include <linux/clk.h> #include <linux/gpio/aspeed.h> @@ -31,12 +32,6 @@ #include <linux/gpio/consumer.h> #include "gpiolib.h" -/* 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)) - #define GPIO_G7_IRQ_STS_BASE 0x100 #define GPIO_G7_IRQ_STS_OFFSET(x) (GPIO_G7_IRQ_STS_BASE + (x) * 0x4) #define GPIO_G7_CTRL_REG_BASE 0x180 |
