zephyr: struct device const-ification
Follows up the change added to Zephyr with:
https://github.com/zephyrproject-rtos/zephyr/pull/24873
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
diff --git a/boot/zephyr/flash_map_extended.c b/boot/zephyr/flash_map_extended.c
index c77f96c..ffa4500 100644
--- a/boot/zephyr/flash_map_extended.c
+++ b/boot/zephyr/flash_map_extended.c
@@ -27,9 +27,9 @@
#error "FLASH_DEVICE_ID could not be determined"
#endif
-static struct device *flash_dev;
+static const struct device *flash_dev;
-struct device *flash_device_get_binding(char *dev_name)
+const struct device *flash_device_get_binding(char *dev_name)
{
if (!flash_dev) {
flash_dev = device_get_binding(dev_name);
diff --git a/boot/zephyr/include/flash_map_backend/flash_map_backend.h b/boot/zephyr/include/flash_map_backend/flash_map_backend.h
index 20dd379..8b5fd0c 100644
--- a/boot/zephyr/include/flash_map_backend/flash_map_backend.h
+++ b/boot/zephyr/include/flash_map_backend/flash_map_backend.h
@@ -38,7 +38,7 @@
*
* Returns the flash device on success, or NULL on failure.
*/
-struct device *flash_device_get_binding(char *dev_name);
+const struct device *flash_device_get_binding(char *dev_name);
/*
* Retrieve a memory-mapped flash device's base address.