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/sst28sf040.c b/sst28sf040.c
index a9a740c..52e4256 100644
--- a/sst28sf040.c
+++ b/sst28sf040.c
@@ -119,7 +119,7 @@
int erase_chip_28sf040(struct flashctx *flash, unsigned int addr,
unsigned int blocklen)
{
- if ((addr != 0) || (blocklen != flash->total_size * 1024)) {
+ if ((addr != 0) || (blocklen != flash->chip->total_size * 1024)) {
msg_cerr("%s called with incorrect arguments\n",
__func__);
return -1;