[flashrom] [PATCH 5/6] On shutdown, reset count of registered programmers

Nico Huber nico.huber at secunet.com
Mon Dec 10 15:34:13 CET 2012


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 <nico.huber at secunet.com>
---
 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





More information about the flashrom mailing list