Since mtd got added, replace flash->erase_size with mtd->erasesize. Cc: Fabio Estevam <fabio.este...@freescale.com> Reviewed-by: Heiko Schocher <h...@denx.de> Signed-off-by: Jagan Teki <jt...@openedev.com> --- drivers/mtd/spi/sf_ops.c | 4 ++-- include/spi_flash.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c index 5a7f5d5..2e279e6 100644 --- a/drivers/mtd/spi/sf_ops.c +++ b/drivers/mtd/spi/sf_ops.c @@ -791,8 +791,8 @@ int stm_unlock(struct spi_flash *flash, u32 ofs, size_t len) return ret; /* Cannot unlock; would unlock larger region than requested */ - if (stm_is_locked_sr(flash, status_old, ofs - flash->erase_size, - flash->erase_size)) + if (stm_is_locked_sr(flash, status_old, ofs - mtd->erasesize, + mtd->erasesize)) return -EINVAL; /* * Need largest pow such that: diff --git a/include/spi_flash.h b/include/spi_flash.h index 0fee203..d66a8ec 100644 --- a/include/spi_flash.h +++ b/include/spi_flash.h @@ -46,7 +46,6 @@ struct spi_slave; * @flags: Indication of spi flash flags * @page_size: Write (page) size * @sector_size: Sector size - * @erase_size: Erase size * @bank_read_cmd: Bank read cmd * @bank_write_cmd: Bank write cmd * @bank_curr: Current flash bank @@ -74,7 +73,6 @@ struct spi_flash { u32 page_size; u32 sector_size; - u32 erase_size; #ifdef CONFIG_SPI_FLASH_BAR u8 bank_read_cmd; u8 bank_write_cmd; -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot