To get things working correctly again after programmer_shutdown(),
registered_programmer_count has to be reset. Herewith, we can start
another run with programmer_init().

Signed-off-by: Nico Huber <[email protected]>
---
 flashrom.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/flashrom.c b/flashrom.c
index b0366ec..3013c5b 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -351,6 +351,10 @@ int programmer_shutdown(void)
                int i = --shutdown_fn_count;
                ret |= shutdown_fn[i].func(shutdown_fn[i].data);
        }
+
+       /* Set count of programmers to zero. */
+       registered_programmer_count = 0;
+
        return ret;
 }
 
-- 
1.7.9.5


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to