On Wed, 12 Dec 2018 23:02:21 +0530 Vignesh R <vigne...@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. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot