Make struct flashchip a field in struct flashctx instead of a complete copy
All the driver conversion work and cleanup has been done by Stefan.
flashrom.c and cli_classic.c are a joint work of Stefan and Carl-Daniel.
Corresponding to flashrom svn r1579.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
diff --git a/dediprog.c b/dediprog.c
index 9559eed..a81cf83 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -381,7 +381,7 @@
unsigned int start, unsigned int len, uint8_t dedi_spi_cmd)
{
int ret;
- const unsigned int chunksize = flash->page_size;
+ const unsigned int chunksize = flash->chip->page_size;
unsigned int residue = start % chunksize ? chunksize - start % chunksize : 0;
unsigned int bulklen;