mtd: rawnand: Provide a helper to get chip->data_buf
authorBoris Brezillon <bbrezillon@kernel.org>
Sun, 28 Oct 2018 14:27:55 +0000 (15:27 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 8 Apr 2019 08:21:13 +0000 (10:21 +0200)
commiteeab717483e5fb529c8001d36fbda14011905e5f
tree370fe60ea2de0ee3d6847dad53ba2abeea8c1b71
parenta7ab085d7c16a7367a0c93ee39d0750d23b537f9
mtd: rawnand: Provide a helper to get chip->data_buf

We plan to move cache related fields to a pagecache struct in nand_chip
but some drivers access ->pagebuf directly to invalidate the cache
before they start using ->data_buf.

Let's provide an helper that returns a pointer to ->data_buf after
invalidating the cache.

Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
drivers/mtd/nand/raw/brcmnand/brcmnand.c
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
drivers/mtd/nand/raw/marvell_nand.c
drivers/mtd/nand/raw/nand_base.c
drivers/mtd/nand/raw/nand_bbt.c
drivers/mtd/nand/raw/qcom_nandc.c
drivers/mtd/nand/raw/sunxi_nand.c
include/linux/mtd/rawnand.h