From 8b792c4773c3131d96fa750cd1502eb4ab3a05d4 Mon Sep 17 00:00:00 2001 From: marco <49691247+marcoSchr@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:50:41 +0100 Subject: [PATCH] NVM: zephyr: fixed compilation errors --- platform/drivers/NVM/flash_zephyr.c | 9 +++++---- platform/drivers/NVM/flash_zephyr.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/platform/drivers/NVM/flash_zephyr.c b/platform/drivers/NVM/flash_zephyr.c index b4220ba6..13851d1c 100644 --- a/platform/drivers/NVM/flash_zephyr.c +++ b/platform/drivers/NVM/flash_zephyr.c @@ -49,10 +49,11 @@ int zephirFlash_init(const struct nvmDevice* dev) const struct flash_parameters *info = flash_get_parameters(TO_DEV_HANDLE(dev->priv)); // TODO: erase size and erase cycles to be retrieved from the real device. - dev->info->write_size = info->write_block_size; - dev->info->erase_size = 4096; - dev->info->erase_cycles = 100000; - dev->info->device_info = NVM_FLASH | NVM_WRITE | NVM_BITWRITE | NVM_ERASE; + struct nvmInfo *nvm_info = (struct nvmInfo *) dev->info; + nvm_info->write_size = info->write_block_size; + nvm_info->erase_size = 4096; + nvm_info->erase_cycles = 100000; + nvm_info->device_info = NVM_FLASH | NVM_WRITE | NVM_BITWRITE | NVM_ERASE; return 0; } diff --git a/platform/drivers/NVM/flash_zephyr.h b/platform/drivers/NVM/flash_zephyr.h index a0493de8..c701a859 100644 --- a/platform/drivers/NVM/flash_zephyr.h +++ b/platform/drivers/NVM/flash_zephyr.h @@ -44,7 +44,7 @@ extern const struct nvmOps zephyr_flash_ops; static struct nvmInfo nvm_devInfo_##name; \ static const struct nvmDevice name = \ { \ - .priv = DEVICE_DT_GET(DT_ALIAS(alias)) \ + .priv = DEVICE_DT_GET(DT_ALIAS(alias)), \ .ops = &zephyr_flash_ops, \ .info = &nvm_devInfo_##name, \ .size = sz \