summaryrefslogtreecommitdiff
path: root/drivers/mtd/altera_qspi.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-08-16 17:30:02 +0200
committerJagan Teki <jagan@amarulasolutions.com>2018-09-20 20:10:49 +0530
commitca040d8512f4d93a7eb83f7b8fec8f4b8b1d3192 (patch)
treeed76a419083ca802845e8e0800486a144a2de671 /drivers/mtd/altera_qspi.c
parent8fad769f1eab88a2bcf0b714694158968f58715a (diff)
mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing
Some MTD sublayers/drivers are implementing ->_read/write() and not ->_read/write_oob(). While for NAND devices both are usually valid, for NOR devices, using the _oob variant has no real meaning. But, as the MTD layer is supposed to hide as much as possible the flash complexity to the user, there is no reason to error out while it is just a matter of rewritting things internally. Add a fallback on mtd->_read() (resp. mtd->_write()) when the user calls mtd_read_oob() (resp. mtd_write_oob()) while mtd->_read_oob() (resp. mtd->_write_oob) is not implemented. There is already a fallback on the _oob variant if the former is used. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/altera_qspi.c')
0 files changed, 0 insertions, 0 deletions