flash: Rename init_flash_dev to flash_dev_init

Change-Id: I6b9a916053baf09c34100dcb5262a4b66a44bc80
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/flash.c b/flash.c
index 1513843..63a1293 100644
--- a/flash.c
+++ b/flash.c
@@ -30,7 +30,7 @@
 #include "common.h"
 #include "flash.h"
 
-int init_flash_dev(struct mbox_context *context)
+int flash_dev_init(struct mbox_context *context)
 {
 	char *filename = get_dev_mtd();
 	int fd, rc = 0;
diff --git a/flash.h b/flash.h
index 5b47769..1c66fc2 100644
--- a/flash.h
+++ b/flash.h
@@ -9,7 +9,7 @@
 
 #include "mbox.h"
 
-int init_flash_dev(struct mbox_context *context);
+int flash_dev_init(struct mbox_context *context);
 void free_flash_dev(struct mbox_context *context);
 int64_t copy_flash(struct mbox_context *context, uint32_t offset, void *mem,
 		   uint32_t size);
diff --git a/mboxd.c b/mboxd.c
index 6ebe596..545d142 100644
--- a/mboxd.c
+++ b/mboxd.c
@@ -369,7 +369,7 @@
 		goto finish;
 	}
 
-	rc = init_flash_dev(context);
+	rc = flash_dev_init(context);
 	if (rc) {
 		goto finish;
 	}
diff --git a/test/erase_flash.c b/test/erase_flash.c
index 1a707a2..f4f4821 100644
--- a/test/erase_flash.c
+++ b/test/erase_flash.c
@@ -109,7 +109,7 @@
 	n_ioctls = 0;
 	recorded = NULL;
 
-	init_flash_dev(&context);
+	flash_dev_init(&context);
 
 	/* Erase from an unknown state */
 	rc = erase_flash(&context, 0, sizeof(data));
diff --git a/test/mbox.c b/test/mbox.c
index 7e03292..b45f42f 100644
--- a/test/mbox.c
+++ b/test/mbox.c
@@ -242,7 +242,7 @@
 	assert(rc == 0);
 	test.context.fds[MBOX_FD].fd = test.mbox.fd;
 
-	rc = init_flash_dev(&test.context);
+	rc = flash_dev_init(&test.context);
 	assert(rc == 0);
 
 	rc = fallocate(test.flash.fd, 0, 0, test.context.mtd_info.size);
diff --git a/test/write_flash.c b/test/write_flash.c
index b09e7de..4f37bef 100644
--- a/test/write_flash.c
+++ b/test/write_flash.c
@@ -63,7 +63,7 @@
 
 	mbox_vlog = &mbox_log_console;
 
-	rc = init_flash_dev(context);
+	rc = flash_dev_init(context);
 	assert(rc == 0);
 
 	map = mmap(NULL, MEM_SIZE, PROT_READ, MAP_PRIVATE, tmp->fd, 0);
diff --git a/vpnor/flash.cpp b/vpnor/flash.cpp
index 2d58463..b5a2122 100644
--- a/vpnor/flash.cpp
+++ b/vpnor/flash.cpp
@@ -42,7 +42,7 @@
 };
 using StringPtr = std::unique_ptr<char, StringDeleter>;
 
-int init_flash_dev(struct mbox_context* context)
+int flash_dev_init(struct mbox_context* context)
 {
     StringPtr filename(get_dev_mtd());
     int fd = 0;