mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 9 Jan 2018 08:50:34 +0000 (09:50 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 16 Jan 2018 14:23:21 +0000 (15:23 +0100)
commit24ff12922278573b1e4c54b4898ab7a3c64be960
tree530fb669aac994de12e307cf92e83ffb21ef1c88
parentd020fc8e5089dd6c60b1638030e0046dffa0fdbc
mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing

Some MTD sublayers/drivers are implementing ->_read/write_oob() and
provide dummy wrappers for their ->_read/write() implementations.
Let the core handle this case instead of duplicating the logic.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
drivers/mtd/devices/docg3.c
drivers/mtd/mtdcore.c
drivers/mtd/mtdpart.c
drivers/mtd/nand/nand_base.c
drivers/mtd/onenand/onenand_base.c