drivers: ieee802154: Convert drivers to new DT device macros

Convert ieee802154 drivers from:

    DEVICE_AND_API_INIT -> DEVICE_DT_INST_DEFINE
    NET_DEVICE_INIT -> NET_DEVICE_DT_INST_DEFINE

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-12-17 12:09:42 -06:00 committed by Kumar Gala
commit 6efb17a821
2 changed files with 8 additions and 10 deletions

View file

@ -1668,13 +1668,12 @@ static struct ieee802154_radio_api dwt_radio_api = {
#define DWT_PSDU_LENGTH (127 - DWT_FCS_LENGTH) #define DWT_PSDU_LENGTH (127 - DWT_FCS_LENGTH)
#if defined(CONFIG_IEEE802154_RAW_MODE) #if defined(CONFIG_IEEE802154_RAW_MODE)
DEVICE_AND_API_INIT(dw1000, DT_INST_LABEL(0), DEVICE_DT_INST_DEFINE(0, dw1000_init, device_pm_control_nop,
dw1000_init, &dwt_0_context, &dw1000_0_config, &dwt_0_context, &dw1000_0_config,
POST_KERNEL, CONFIG_IEEE802154_DW1000_INIT_PRIO, POST_KERNEL, CONFIG_IEEE802154_DW1000_INIT_PRIO,
&dwt_radio_api); &dwt_radio_api);
#else #else
NET_DEVICE_INIT(dw1000, NET_DEVICE_DT_INST_DEFINE(0,
DT_INST_LABEL(0),
dw1000_init, dw1000_init,
device_pm_control_nop, device_pm_control_nop,
&dwt_0_context, &dwt_0_context,

View file

@ -950,10 +950,10 @@ static struct ieee802154_radio_api rf2xx_radio_api = {
} }
#define IEEE802154_RF2XX_RAW_DEVICE_INIT(n) \ #define IEEE802154_RF2XX_RAW_DEVICE_INIT(n) \
DEVICE_AND_API_INIT( \ DEVICE_DT_INST_DEFINE( \
rf2xx_##n, \ n, \
DT_INST_LABEL(n), \
&rf2xx_init, \ &rf2xx_init, \
device_pm_control_nop, \
&rf2xx_ctx_data_##n, \ &rf2xx_ctx_data_##n, \
&rf2xx_ctx_config_##n, \ &rf2xx_ctx_config_##n, \
POST_KERNEL, \ POST_KERNEL, \
@ -961,9 +961,8 @@ static struct ieee802154_radio_api rf2xx_radio_api = {
&rf2xx_radio_api) &rf2xx_radio_api)
#define IEEE802154_RF2XX_NET_DEVICE_INIT(n) \ #define IEEE802154_RF2XX_NET_DEVICE_INIT(n) \
NET_DEVICE_INIT( \ NET_DEVICE_DT_INST_DEFINE( \
rf2xx_##n, \ n, \
DT_INST_LABEL(n), \
&rf2xx_init, \ &rf2xx_init, \
device_pm_control_nop, \ device_pm_control_nop, \
&rf2xx_ctx_data_##n, \ &rf2xx_ctx_data_##n, \