diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2021-06-24 16:28:16 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-28 12:56:28 +0000 |
commit | bcaeebb1efb5f26ee6ef63e19b97894a3b89ab22 (patch) | |
tree | d84514b1655a9725141ad4fd0eaa53b80bca2862 /zephyr/drivers/cros_flash | |
parent | 3d5563af348f24cd21317252fdea2f2c87103f7e (diff) | |
download | chrome-ec-bcaeebb1efb5f26ee6ef63e19b97894a3b89ab22.tar.gz |
zephyr: drivers: use DEVICE_DT_INST_DEFINE for device definitions
Use DEVICE_DT_INST_DEFINE for drivers defined within the zephyr shim.
This ensures that the static nodes used by DEVICE_DT_GET are defined and
usable.
BRANCH=none
BUG=none
TEST=zmake configure -b -B ~/build-volteer/ zephyr/projects/volteer/volteer
TEST=zmake configure -b -B ~/build-it8xxx2_evb/ zephyr/projects/it8xxx2_evb
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Icc04e489cf3ecdcd68862e16dab025376602b7ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2985461
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr/drivers/cros_flash')
-rw-r--r-- | zephyr/drivers/cros_flash/cros_flash_npcx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/zephyr/drivers/cros_flash/cros_flash_npcx.c b/zephyr/drivers/cros_flash/cros_flash_npcx.c index e58e15782b..92ebc98c2f 100644 --- a/zephyr/drivers/cros_flash/cros_flash_npcx.c +++ b/zephyr/drivers/cros_flash/cros_flash_npcx.c @@ -518,6 +518,7 @@ static const struct cros_flash_npcx_config cros_flash_cfg = { static struct cros_flash_npcx_data cros_flash_data; -DEVICE_DEFINE(cros_flash_npcx_0, DT_INST_LABEL(0), flash_npcx_init, NULL, - &cros_flash_data, &cros_flash_cfg, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &cros_flash_npcx_driver_api); +DEVICE_DT_INST_DEFINE(0, flash_npcx_init, NULL, &cros_flash_data, + &cros_flash_cfg, PRE_KERNEL_1, + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &cros_flash_npcx_driver_api); |