Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: wpce775x.c

Issue 6897014: Do not call EC programmer shutdown functions explicitly. (Closed) Base URL: svn://coreboot.org/flashrom/trunk
Patch Set: rename shutdown() to flashrom_shutdown() to avoid conflict with shutdown(2) Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« programmer.h ('K') | « programmer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: wpce775x.c
diff --git a/wpce775x.c b/wpce775x.c
index f394e64b6fb8d132bd9468233a905c2fc648850f..bf2bd4e352de0d2c3d1497c8f7ad4bb41bbc3171 100644
--- a/wpce775x.c
+++ b/wpce775x.c
@@ -52,6 +52,8 @@
#include "spi.h"
#include "writeprotect.h"
+void wpce775x_shutdown(void *);
+
/**
* Definition of WPCE775X WCB (Write Command Buffer), as known as Shared Access
* Window 2.
@@ -597,15 +599,15 @@ int wpce775x_spi_common_init(void)
if (EnterFlashUpdate()) return 1;
spi_controller = SPI_CONTROLLER_WPCE775X;
+ register_shutdown(wpce775x_shutdown, NULL);
msg_pdbg("%s(): successfully initialized wpce775x\n", __func__);
return 0;
-
}
-int wpce775x_shutdown(void)
+void wpce775x_shutdown(void *data)
{
if (spi_controller != SPI_CONTROLLER_WPCE775X)
- return 0;
+ return;
msg_pdbg("%s(): firmware %s\n", __func__,
firmware_changed ? "changed" : "not changed");
@@ -624,8 +626,6 @@ int wpce775x_shutdown(void)
free(initflash_cfg);
else
msg_perr("%s(): No initflash_cfg to free?!?\n", __func__);
-
- return 0;
}
/* Called by internal_init() */
« programmer.h ('K') | « programmer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698