Index: flashrom.c |
diff --git a/flashrom.c b/flashrom.c |
index a9fbbc1cb0e0dead111d25982d43269191f6e59c..58b66a9426297fcfd41c20e4f99cb3fb6d649b1a 100644 |
--- a/flashrom.c |
+++ b/flashrom.c |
@@ -124,7 +124,8 @@ const struct programmer_entry programmer_table[] = { |
{ |
.name = "internal", |
.init = internal_init, |
- .shutdown = internal_shutdown, |
+ /* called implicitly using shutdown callback */ |
+// .shutdown = internal_shutdown, |
Louis
2011/04/26 10:06:06
This line should be restored. See programmer_shutd
|
.map_flash_region = physmap, |
.unmap_flash_region = physunmap, |
.chip_readb = internal_chip_readb, |
@@ -575,15 +576,17 @@ int chip_restore() |
return rc; |
} |
-int programmer_shutdown(void) |
+int flashrom_shutdown(void) |
Louis
2011/04/26 10:06:06
We don't need to change to flashrom_shutdown. prog
dhendrix
2011/04/27 02:08:06
Agreed. That was a bit ambitious of me :-)
Revert
|
{ |
+ msg_gdbg("%s: carrying out %d shutdown callbacks\n", |
+ __func__, shutdown_fn_count); |
/* Registering shutdown functions is no longer allowed. */ |
Louis
2011/04/26 10:06:06
Could you add the following code to avoid flashrom
dhendrix
2011/04/27 02:08:06
Good idea, however may_register_shutdown is set by
|
may_register_shutdown = 0; |
while (shutdown_fn_count > 0) { |
int i = --shutdown_fn_count; |
shutdown_fn[i].func(shutdown_fn[i].data); |
} |
- return programmer_table[programmer].shutdown(); |
+ return 0; |
Louis
2011/04/26 10:06:06
We still need programmer_table[programmer].shutdow
dhendrix
2011/04/27 02:08:06
Hmm, the reason I removed programmer_table[program
Louis
2011/04/27 02:25:33
Sorry that I didn't say my comment very clearly. M
dhendrix
2011/04/27 20:07:29
Ah! That makes more sense. Thanks for the detailed
|
} |
void *programmer_map_flash_region(const char *descr, unsigned long phys_addr, |
@@ -2008,10 +2011,10 @@ out: |
out_nofree: |
chip_restore(); /* must be done before programmer_shutdown() */ |
/* |
- * programmer_shutdown() call is moved to cli_mfg() in chromium os |
+ * flashrom_shutdown() call is moved to cli_mfg() in chromium os |
* tree. This is because some operations, such as write protection, |
* requires programmer_shutdown() but does not call doit(). |
*/ |
-// programmer_shutdown(); |
+// flashrom_shutdown(); |
return ret; |
} |