drivers/flash: stm32: Use stm32 generic compat as driver compatible

Instead of various series compatibles, use single stm32 generic
compatible as reference for stm32 flash driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-04-13 18:07:07 +02:00 committed by Kumar Gala
commit 65eacef644

View file

@ -9,25 +9,7 @@
#include <kernel.h>
#include <device.h>
#if DT_HAS_NODE(DT_INST(0, st_stm32f0_flash_controller))
#define DT_DRV_COMPAT st_stm32f0_flash_controller
#elif DT_HAS_NODE(DT_INST(0, st_stm32f1_flash_controller))
#define DT_DRV_COMPAT st_stm32f1_flash_controller
#elif DT_HAS_NODE(DT_INST(0, st_stm32f3_flash_controller))
#define DT_DRV_COMPAT st_stm32f3_flash_controller
#elif DT_HAS_NODE(DT_INST(0, st_stm32f4_flash_controller))
#define DT_DRV_COMPAT st_stm32f4_flash_controller
#elif DT_HAS_NODE(DT_INST(0, st_stm32f7_flash_controller))
#define DT_DRV_COMPAT st_stm32f7_flash_controller
#elif DT_HAS_NODE(DT_INST(0, st_stm32g0_flash_controller))
#define DT_DRV_COMPAT st_stm32g0_flash_controller
#elif DT_HAS_NODE(DT_INST(0, st_stm32g4_flash_controller))
#define DT_DRV_COMPAT st_stm32g4_flash_controller
#elif DT_HAS_NODE(DT_INST(0, st_stm32l4_flash_controller))
#define DT_DRV_COMPAT st_stm32l4_flash_controller
#elif DT_HAS_NODE(DT_INST(0, st_stm32wb_flash_controller))
#define DT_DRV_COMPAT st_stm32wb_flash_controller
#endif /* DT_HAS_NODE(DT_INST(0, st_stm32xx_flash_controller)) */
#define DT_DRV_COMPAT st_stm32_flash_controller
#include <string.h>
#include <drivers/flash.h>