]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mtd: spinand: Make use of the operation templates through SPINAND_OP()
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 9 Jan 2026 17:18:08 +0000 (18:18 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 29 Jan 2026 19:21:40 +0000 (20:21 +0100)
commit88b0e3584acb905c41252b7917013ecf7c0518bc
treefd34d747b8653c98fffdba0943bd9c2bf83319e2
parent408015023294958407925bc50cdd85718d12a335
mtd: spinand: Make use of the operation templates through SPINAND_OP()

Create a SPINAND_OP() macro to which we give the name of the operation
we want. This macro retrieves the correct operation template based on
the current bus interface (currently only single SDR, will soon be
extended to octal DTR) and fills it with the usual parameters.

This macro makes the transition from calling directly the low-level
macros into using the (bus interface dependent) templates very smooth.
Use it in all places that can be trivially converted. At this stage
there is no functional change expected, until octal DTR support gets
added.

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/spi/core.c
drivers/mtd/nand/spi/esmt.c
drivers/mtd/nand/spi/gigadevice.c
drivers/mtd/nand/spi/macronix.c
drivers/mtd/nand/spi/micron.c
drivers/mtd/nand/spi/toshiba.c
drivers/mtd/nand/spi/winbond.c
include/linux/mtd/spinand.h