Edward O'Callaghan has uploaded this change for review.
flashrom: Pass down flashprog to prog_init() fn
Change-Id: I32be4ea9913454e205142b96bf8ba45f8be919f1
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M flashrom.c
M include/programmer.h
M libflashrom.c
3 files changed, 14 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/80/72780/1
diff --git a/flashrom.c b/flashrom.c
index f26bb47..a0754e6 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -121,7 +121,8 @@
return rc;
}
-int programmer_init(const struct programmer_entry *prog, const char *param)
+int programmer_init(struct flashrom_programmer **const flashprog,
+ const struct programmer_entry *prog, const char *param)
{
int ret;
diff --git a/include/programmer.h b/include/programmer.h
index db32b2c..233a6fe 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -95,7 +95,7 @@
extern const struct programmer_entry programmer_usbblaster_spi;
extern const struct programmer_entry programmer_dirtyjtag_spi;
-int programmer_init(const struct programmer_entry *prog, const char *param);
+int programmer_init(struct flashrom_programmer **const flashprog, const struct programmer_entry *prog, const char *param);
int programmer_shutdown(void);
struct bitbang_spi_master {
diff --git a/libflashrom.c b/libflashrom.c
index 2e89fe5..b6466fb 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -204,7 +204,7 @@
list_programmers_linebreak(0, 80, 0);
return 1;
}
- return programmer_init(programmer_table[prog], prog_param);
+ return programmer_init(flashprog, programmer_table[prog], prog_param);
}
int flashrom_programmer_shutdown(struct flashrom_programmer *const flashprog)
To view, visit change 72780. To unsubscribe, or for help writing mail filters, visit settings.