Merge branch 'master' of git://git.denx.de/u-boot
[oweals/u-boot.git] / drivers / mtd / spi / sandbox.c
index 09ce7837ea9e3d75e5b23a730a02c227e8d9d160..4944059fa3f16c1d8710089f18e92246854bea3b 100644 (file)
@@ -289,7 +289,7 @@ static int sandbox_sf_process_cmd(struct sandbox_spi_flash *sbsf, const u8 *rx,
                /* we only support erase here */
                if (sbsf->cmd == CMD_ERASE_CHIP) {
                        sbsf->erase_size = sbsf->data->sector_size *
-                               sbsf->data->nr_sectors;
+                               sbsf->data->n_sectors;
                } else if (sbsf->cmd == CMD_ERASE_4K && (flags & SECT_4K)) {
                        sbsf->erase_size = 4 << 10;
                } else if (sbsf->cmd == CMD_ERASE_64K && !(flags & SECT_4K)) {