Use flashprog_flash_getsize() where possible

Change-Id: I4eab12dc9dcf0c7fdffc5c662081868c6f32e36c
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/493
diff --git a/it87spi.c b/it87spi.c
index 8c32afd..3ac25b1 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -390,7 +390,7 @@
 	 * the mainboard does not use IT87 SPI translation. This should be done
 	 * via a programmer parameter for the internal programmer.
 	 */
-	if ((flash->chip->total_size * 1024 > it87spi_max_mmapped)) {
+	if ((flashprog_flash_getsize(flash) > it87spi_max_mmapped)) {
 		default_spi_read(flash, buf, start, len);
 	} else {
 		unsigned char *const bios = it87spi_mmapped_flash +