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> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
This commit is contained in:
committed by
Jagan Teki
parent
9dc8d155d4
commit
596cf083da
@@ -2656,8 +2656,6 @@ int onenand_probe(struct mtd_info *mtd)
|
||||
|
||||
mtd->flags = MTD_CAP_NANDFLASH;
|
||||
mtd->_erase = onenand_erase;
|
||||
mtd->_read = onenand_read;
|
||||
mtd->_write = onenand_write;
|
||||
mtd->_read_oob = onenand_read_oob;
|
||||
mtd->_write_oob = onenand_write_oob;
|
||||
mtd->_sync = onenand_sync;
|
||||
|
||||
Reference in New Issue
Block a user