
12 Dec
2018
12 Dec
'18
9:31 p.m.
On Wed, 12 Dec 2018 23:02:21 +0530 Vignesh R vigneshr@ti.com wrote:
@@ -39,13 +37,12 @@ static int spi_flash_mtd_erase(struct mtd_info *mtd, struct erase_info *instr) static int spi_flash_mtd_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) {
struct spi_flash *flash = mtd->priv; int err;
if (!flash)
- if (!mtd || !mtd->priv) return -ENODEV;
- err = spi_flash_read(flash, from, len, buf);
- err = mtd->_read(mtd, from, len, retlen, buf);
Please use the wrappers instead of calling those hooks directly.