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/sst_fwhub.c b/sst_fwhub.c
index cd1465d..05c0876 100644
--- a/sst_fwhub.c
+++ b/sst_fwhub.c
@@ -28,7 +28,7 @@
 
 	blockstatus = chip_readb(flash, registers + offset + 2);
 	msg_cdbg("Lock status for 0x%06x (size 0x%06x) is %02x, ",
-		     offset, flash->chip->page_size, blockstatus);
+		     offset, flash->chip.page_size, blockstatus);
 	switch (blockstatus & 0x3) {
 	case 0x0:
 		msg_cdbg("full access\n");
@@ -69,7 +69,7 @@
 {
 	unsigned int i;
 
-	for (i = 0; i < flashprog_flash_getsize(flash); i += flash->chip->page_size)
+	for (i = 0; i < flashprog_flash_getsize(flash); i += flash->chip.page_size)
 		check_sst_fwhub_block_lock(flash, i);
 
 	return 0;
@@ -80,7 +80,7 @@
 	unsigned int i;
 	int ret = 0;
 
-	for (i = 0; i < flashprog_flash_getsize(flash); i += flash->chip->page_size)
+	for (i = 0; i < flashprog_flash_getsize(flash); i += flash->chip.page_size)
 	{
 		if (clear_sst_fwhub_block_lock(flash, i))
 		{