Draw struct flashchip into struct flashprog_flashctx
We used to have a reference to a dynamically allocated struct flashchip
inside the flash context. But now that we only ever allocate both in one
go, we can let go of the reference and make it a single structure.
Change-Id: I857acb1def6d133a5cbc28fc7a99b7b1a22b55e0
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/494
diff --git a/cli_classic.c b/cli_classic.c
index 916845a..d712bde 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -211,7 +211,7 @@
msg_pdbg("Chip size %u kB is bigger than supported size %zu kB of\n"
"chipset/board/programmer for memory-mapped interface.\n",
- flash->chip->total_size, flash->mst.common->max_rom_decode / KiB);
+ flash->chip.total_size, flash->mst.common->max_rom_decode / KiB);
if (!force) {
msg_cerr("This flash chip is too big for this programmer (--verbose/-V gives details).\n"
@@ -507,7 +507,7 @@
ret = 1;
goto out_shutdown;
}
- chip = fill_flash->chip;
+ chip = &fill_flash->chip;
if (show_progress)
flashprog_set_progress_callback(fill_flash, &flashprog_progress_cb, NULL);