drivers: can: remove DT_CHOSEN_ZEPHYR_CANBUS_LABEL macro

Remove the DT_CHOSEN_ZEPHYR_CANBUS_LABEL macro and replace it with
DEVICE_DT_GET(DT_CHOSEN(zephyr_canbus)) were possible.

Where both devicetree CAN controllers and Kconfig specified CAN loopback
controllers are supported, the macro is replaced with
DT_LABEL(DT_CHOSEN(zephyr_canbus)) for now.

This is the first pass for removing the requirement for devicetree
labels for CAN controllers.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2021-11-07 15:50:43 +01:00 committed by Carles Cufí
commit 5bc0451f72
10 changed files with 18 additions and 36 deletions

View file

@ -45,14 +45,6 @@
*/
#define DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL ""
/**
* @def DT_CHOSEN_ZEPHYR_CANBUS_LABEL
*
* @brief If there is a chosen node zephyr,canbus property which has
* a label property, that property's value. Undefined otherwise.
*/
#define DT_CHOSEN_ZEPHYR_CANBUS_LABEL ""
#endif /* DT_DOXYGEN */
#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_entropy), label)
@ -64,10 +56,6 @@
DT_LABEL(DT_CHOSEN(zephyr_flash_controller))
#endif
#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_canbus), label)
#define DT_CHOSEN_ZEPHYR_CANBUS_LABEL \
DT_LABEL(DT_CHOSEN(zephyr_canbus))
#endif
/**
* @}
*/