Alexander Goncharov has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/72159 )
Change subject: ni845x_spi: introduce a separate func for cleaning up ......................................................................
ni845x_spi: introduce a separate func for cleaning up
TODO: desc
TOPIC=register_master_api
Change-Id: I8b32129b8d0dff9a7516973893fa4bf92f9e64db Signed-off-by: Alexander Goncharov chat@joursoir.net --- M ni845x_spi.c 1 file changed, 22 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/59/72159/1
diff --git a/ni845x_spi.c b/ni845x_spi.c index 0a5c46d..de907af 100644 --- a/ni845x_spi.c +++ b/ni845x_spi.c @@ -386,7 +386,7 @@ ni845x_report_error("ni845xCloseFindDeviceHandle", tmp); }
-static int ni845x_spi_shutdown(void *data) +static void ni845x_spi_cleanup(NiHandle configuration_handle, uInt32 device_handle) { int32 ret = 0;
@@ -401,6 +401,12 @@ if (ret) ni845x_report_error("ni845xClose", ret); } +} + +static int ni845x_spi_shutdown(void *data) +{ + ni845x_spi_cleanup(configuration_handle, device_handle); + return 0; }
@@ -630,7 +636,7 @@ return register_spi_master(&spi_programmer_ni845x, NULL);
err: - ni845x_spi_shutdown(NULL); + ni845x_spi_cleanup(configuration_handle, device_handle); return 1; }