Skip to content

Commit 2697cfb

Browse files
committed
include/drivers: Switching specific headers to new device macros
Lone files that define their own wrapper macro on top of formely DEVICE_DT_DEFINE macros. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent 5c0422c commit 2697cfb

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

include/zephyr/drivers/emul_stub_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct emul_stub_dev_api {
3535
static struct emul_stub_dev_data stub_data_##n; \
3636
static struct emul_stub_dev_config stub_config_##n; \
3737
static struct emul_stub_dev_api stub_api_##n; \
38-
DEVICE_DT_INST_DEFINE(n, &emul_init_stub_##n, NULL, &stub_data_##n, &stub_config_##n, \
39-
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &stub_api_##n);
38+
DEVICE_INSTANCE_FROM_DT_INST(n, &emul_init_stub_##n, NULL, &stub_data_##n, \
39+
&stub_config_##n, POST_KERNEL, &stub_api_##n);
4040

4141
#endif /* ZEPHYR_INCLUDE_EMUL_STUB_DEVICE_H_ */

include/zephyr/drivers/gpio/gpio_mmio32.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ static const struct gpio_mmio32_config _CONCAT(Z_DEVICE_DT_DEV_ID(node_id), _cfg
5656
.mask = _mask, \
5757
}; \
5858
\
59-
DEVICE_DT_DEFINE(node_id, \
60-
&gpio_mmio32_init, \
61-
NULL, \
62-
&_CONCAT(Z_DEVICE_DT_DEV_ID(node_id), _ctx), \
63-
&_CONCAT(Z_DEVICE_DT_DEV_ID(node_id), _cfg), \
64-
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
65-
&gpio_mmio32_api)
59+
DEVICE_INSTANCE(node_id, \
60+
&gpio_mmio32_init, \
61+
NULL, \
62+
&_CONCAT(Z_DEVICE_DT_DEV_ID(node_id), _ctx), \
63+
&_CONCAT(Z_DEVICE_DT_DEV_ID(node_id), _cfg), \
64+
PRE_KERNEL_1, \
65+
&gpio_mmio32_api)
6666

6767

6868
#else /* CONFIG_GPIO_MMIO32 */

0 commit comments

Comments
 (0)