devicetree: DT_NODE_HAS_COMPAT_STATUS_OKAY -> DT_NODE_HAS_COMPAT_STATUS
Swap this out and make the status a parameter. Leave a couple of cases of DT_NODE_HAS_COMPAT(). Signed-off-by: Kumar Gala <kumar.gala@linaro.org> Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
6f35d3bd16
commit
c2135f8721
17 changed files with 33 additions and 30 deletions
|
@ -20,8 +20,8 @@ LOG_MODULE_DECLARE(can_driver, CONFIG_CAN_LOG_LEVEL);
|
|||
|
||||
#define CAN_INIT_TIMEOUT (10 * sys_clock_hw_cycles_per_sec() / MSEC_PER_SEC)
|
||||
|
||||
#if DT_NODE_HAS_COMPAT_STATUS_OKAY(DT_NODELABEL(can1), st_stm32_can) && \
|
||||
DT_NODE_HAS_COMPAT_STATUS_OKAY(DT_NODELABEL(can2), st_stm32_can)
|
||||
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(can1), st_stm32_can, okay) && \
|
||||
DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(can2), st_stm32_can, okay)
|
||||
#error Simultaneous use of CAN_1 and CAN_2 not supported yet
|
||||
#endif
|
||||
|
||||
|
@ -1045,7 +1045,7 @@ static const struct can_driver_api can_api_funcs = {
|
|||
.register_state_change_isr = can_stm32_register_state_change_isr
|
||||
};
|
||||
|
||||
#if DT_NODE_HAS_COMPAT_STATUS_OKAY(DT_NODELABEL(can1), st_stm32_can)
|
||||
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(can1), st_stm32_can, okay)
|
||||
|
||||
static void config_can_1_irq(CAN_TypeDef *can);
|
||||
|
||||
|
@ -1134,7 +1134,7 @@ NET_DEVICE_INIT(socket_can_stm32_1, SOCKET_CAN_NAME_1, socket_can_init_1,
|
|||
|
||||
#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) */
|
||||
|
||||
#if DT_NODE_HAS_COMPAT_STATUS_OKAY(DT_NODELABEL(can2), st_stm32_can)
|
||||
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(can2), st_stm32_can, okay)
|
||||
|
||||
static void config_can_2_irq(CAN_TypeDef *can);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue