summaryrefslogtreecommitdiffstats
path: root/linux_mtd.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux_mtd.c')
-rw-r--r--linux_mtd.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/linux_mtd.c b/linux_mtd.c
index 7780feb49..42d569d16 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -295,6 +295,17 @@ static int linux_mtd_erase(struct flashctx *flash,
return 0;
}
+static int linux_mtd_shutdown(void *data)
+{
+ struct linux_mtd_data *mtd_data = data;
+ if (mtd_data->dev_fp != NULL) {
+ fclose(mtd_data->dev_fp);
+ }
+ free(data);
+
+ return 0;
+}
+
static const struct opaque_master linux_mtd_opaque_master = {
/* max_data_{read,write} don't have any effect for this programmer */
.max_data_read = MAX_DATA_UNSPECIFIED,
@@ -356,17 +367,6 @@ linux_mtd_setup_exit:
return ret;
}
-static int linux_mtd_shutdown(void *data)
-{
- struct linux_mtd_data *mtd_data = data;
- if (mtd_data->dev_fp != NULL) {
- fclose(mtd_data->dev_fp);
- }
- free(data);
-
- return 0;
-}
-
static int linux_mtd_init(void)
{
char *param;