]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mtd: rawnand: sunxi: Convert to common field_{get,prep}() helpers
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 15 Jan 2026 14:26:22 +0000 (15:26 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 19 Jan 2026 11:06:06 +0000 (12:06 +0100)
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>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/sunxi_nand.c

index 9dcdc93734cbff394a9356e5e07796a8ffcb187e..e66adfcca7cd63fb1117fd12ee69ec7329decc35 100644 (file)
 #include <linux/iopoll.h>
 #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
 #define NFC_REG_ST             0x0004
 #define NFC_REG_INT            0x0008