From 5f81b127e189fba93d8983e7e8b1a895ff82d14a Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 9 Oct 2018 12:18:49 +0200 Subject: [PATCH] zephyr: fix flash_area_read_is_empty Implementation of flash_area_read_is_empty introduced recently uses deprecated hal_flash_read API which caused build failure. This patch uses zephyr's native flash_area_read() API which solves the bug. Signed-off-by: Andrzej Puzdrowski --- boot/zephyr/flash_map_extended.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/zephyr/flash_map_extended.c b/boot/zephyr/flash_map_extended.c index aa472c56..39989a17 100644 --- a/boot/zephyr/flash_map_extended.c +++ b/boot/zephyr/flash_map_extended.c @@ -83,7 +83,7 @@ int flash_area_read_is_empty(const struct flash_area *fa, uint32_t off, uint8_t *u8dst; int rc; - rc = hal_flash_read(fa->fa_device_id, fa->fa_off + off, dst, len); + rc = flash_area_read(fa, off, dst, len); if (rc) { return -1; }