Skip to content

Commit 3b63406

Browse files
committed
drivers: Switching NET_DEVICE_<INIT/DT_DEFINE>... macros to new ones
Switching to NET_DEVICE_INSTANCE, NET_DEVICE_INSTANCE_FROM_DT_INST, NET_DEVICE_INSTANCE_MULTI, NET_DEVICE_INSTANCE_MULT_FROM_DT_INST, NET_DEVICE_OFFLOAD_INSTANCE and NET_DEVICE_OFFLOAD_INSTANCE_FROM_DT_INST. Thus removing prio and name parameters on all. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent 16d6965 commit 3b63406

27 files changed

+46
-68
lines changed

drivers/ethernet/eth_stellaris.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,7 @@ static const struct ethernet_api eth_stellaris_apis = {
363363
#endif
364364
};
365365

366-
NET_DEVICE_DT_INST_DEFINE(0,
366+
NET_DEVICE_INSTANCE_FROM_DT_INST(0,
367367
eth_stellaris_dev_init, NULL,
368-
&eth_data, &eth_cfg, CONFIG_ETH_INIT_PRIORITY,
369-
&eth_stellaris_apis, ETHERNET_L2,
368+
&eth_data, &eth_cfg, &eth_stellaris_apis, ETHERNET_L2,
370369
NET_L2_GET_CTX_TYPE(ETHERNET_L2), NET_ETH_MTU);

drivers/ieee802154/ieee802154_b91.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,7 @@ static const struct ieee802154_radio_api b91_radio_api = {
644644

645645
/* IEEE802154 driver registration */
646646
#if defined(CONFIG_NET_L2_IEEE802154) || defined(CONFIG_NET_L2_OPENTHREAD)
647-
NET_DEVICE_DT_INST_DEFINE(0, b91_init, NULL, &data, NULL,
648-
CONFIG_IEEE802154_B91_INIT_PRIO,
647+
NET_DEVICE_INSTANCE_FROM_DT_INST(0, b91_init, NULL, &data, NULL,
649648
&b91_radio_api, L2, L2_CTX_TYPE, MTU);
650649
#else
651650
DEVICE_INSTANCE_FROM_DT_INST(0, b91_init, NULL, &data, NULL,

drivers/ieee802154/ieee802154_cc1200.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,6 @@ static const struct ieee802154_radio_api cc1200_radio_api = {
824824
.attr_get = cc1200_attr_get,
825825
};
826826

827-
NET_DEVICE_DT_INST_DEFINE(0, cc1200_init, NULL, &cc1200_context_data,
828-
&cc1200_config, CONFIG_IEEE802154_CC1200_INIT_PRIO,
829-
&cc1200_radio_api, IEEE802154_L2,
827+
NET_DEVICE_INSTANCE_FROM_DT_INST(0, cc1200_init, NULL, &cc1200_context_data,
828+
&cc1200_config, &cc1200_radio_api, IEEE802154_L2,
830829
NET_L2_GET_CTX_TYPE(IEEE802154_L2), 125);

drivers/ieee802154/ieee802154_cc13xx_cc26xx.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,9 +816,8 @@ static struct ieee802154_cc13xx_cc26xx_data ieee802154_cc13xx_cc26xx_data = {
816816
#endif
817817

818818
#if defined(CONFIG_NET_L2_IEEE802154) || defined(CONFIG_NET_L2_PHY_IEEE802154)
819-
NET_DEVICE_DT_INST_DEFINE(0, ieee802154_cc13xx_cc26xx_init, NULL,
819+
NET_DEVICE_INSTANCE_FROM_DT_INST(0, ieee802154_cc13xx_cc26xx_init, NULL,
820820
&ieee802154_cc13xx_cc26xx_data, NULL,
821-
CONFIG_IEEE802154_CC13XX_CC26XX_INIT_PRIO,
822821
&ieee802154_cc13xx_cc26xx_radio_api, L2,
823822
L2_CTX_TYPE, MTU);
824823
#else

drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,9 +1053,8 @@ static struct ieee802154_cc13xx_cc26xx_subg_data ieee802154_cc13xx_cc26xx_subg_d
10531053
};
10541054

10551055
#if defined(CONFIG_NET_L2_IEEE802154)
1056-
NET_DEVICE_DT_INST_DEFINE(0, ieee802154_cc13xx_cc26xx_subg_init, NULL,
1056+
NET_DEVICE_INSTANCE_FROM_DT_INST(0, ieee802154_cc13xx_cc26xx_subg_init, NULL,
10571057
&ieee802154_cc13xx_cc26xx_subg_data, NULL,
1058-
CONFIG_IEEE802154_CC13XX_CC26XX_SUB_GHZ_INIT_PRIO,
10591058
&ieee802154_cc13xx_cc26xx_subg_radio_api,
10601059
IEEE802154_L2, NET_L2_GET_CTX_TYPE(IEEE802154_L2),
10611060
IEEE802154_MTU);

drivers/ieee802154/ieee802154_cc2520.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,8 @@ static const struct ieee802154_radio_api cc2520_radio_api = {
10731073
DEVICE_INSTANCE_FROM_DT_INST(0, cc2520_init, NULL, &cc2520_context_data, NULL,
10741074
POST_KERNEL, &cc2520_radio_api);
10751075
#else
1076-
NET_DEVICE_DT_INST_DEFINE(0, cc2520_init, NULL, &cc2520_context_data,
1077-
&cc2520_config, CONFIG_IEEE802154_CC2520_INIT_PRIO,
1078-
&cc2520_radio_api, IEEE802154_L2,
1076+
NET_DEVICE_INSTANCE_FROM_DT_INST(0, cc2520_init, NULL, &cc2520_context_data,
1077+
&cc2520_config, &cc2520_radio_api, IEEE802154_L2,
10791078
NET_L2_GET_CTX_TYPE(IEEE802154_L2), 125);
10801079
#endif
10811080

drivers/ieee802154/ieee802154_dw1000.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,12 +1679,11 @@ DEVICE_INSTANCE_FROM_DT_INST(0, dw1000_init, NULL,
16791679
&dwt_0_context, &dw1000_0_config,
16801680
POST_KERNEL, &dwt_radio_api);
16811681
#else
1682-
NET_DEVICE_DT_INST_DEFINE(0,
1682+
NET_DEVICE_INSTANCE_FROM_DT_INST(0,
16831683
dw1000_init,
16841684
NULL,
16851685
&dwt_0_context,
16861686
&dw1000_0_config,
1687-
CONFIG_IEEE802154_DW1000_INIT_PRIO,
16881687
&dwt_radio_api,
16891688
IEEE802154_L2,
16901689
NET_L2_GET_CTX_TYPE(IEEE802154_L2),

drivers/ieee802154/ieee802154_mcr20a.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,9 +1468,8 @@ DEVICE_INSTANCE_FROM_DT_INST(0, mcr20a_init, NULL, &mcr20a_context_data,
14681468
&mcr20a_config, POST_KERNEL,
14691469
&mcr20a_radio_api);
14701470
#else
1471-
NET_DEVICE_DT_INST_DEFINE(0, mcr20a_init, NULL, &mcr20a_context_data,
1472-
&mcr20a_config, CONFIG_IEEE802154_MCR20A_INIT_PRIO,
1473-
&mcr20a_radio_api, IEEE802154_L2,
1471+
NET_DEVICE_INSTANCE_FROM_DT_INST(0, mcr20a_init, NULL, &mcr20a_context_data,
1472+
&mcr20a_config, &mcr20a_radio_api, IEEE802154_L2,
14741473
NET_L2_GET_CTX_TYPE(IEEE802154_L2),
14751474
MCR20A_PSDU_LENGTH);
14761475
#endif

drivers/ieee802154/ieee802154_nrf5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,8 +1297,8 @@ static const struct ieee802154_radio_api nrf5_radio_api = {
12971297
#endif
12981298

12991299
#if defined(CONFIG_NET_L2_PHY_IEEE802154)
1300-
NET_DEVICE_DT_INST_DEFINE(0, nrf5_init, NULL, &nrf5_data, &nrf5_radio_cfg,
1301-
CONFIG_IEEE802154_NRF5_INIT_PRIO, &nrf5_radio_api, L2,
1300+
NET_DEVICE_INSTANCE_FROM_DT_INST(0, nrf5_init, NULL, &nrf5_data, &nrf5_radio_cfg,
1301+
&nrf5_radio_api, L2,
13021302
L2_CTX_TYPE, MTU);
13031303
#else
13041304
DEVICE_INSTANCE_FROM_DT_INST(0, nrf5_init, NULL, &nrf5_data, &nrf5_radio_cfg,

drivers/ieee802154/ieee802154_rf2xx.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,13 +1160,12 @@ static const struct ieee802154_radio_api rf2xx_radio_api = {
11601160
&rf2xx_radio_api)
11611161

11621162
#define IEEE802154_RF2XX_NET_DEVICE_INIT(n) \
1163-
NET_DEVICE_DT_INST_DEFINE( \
1163+
NET_DEVICE_INSTANCE_FROM_DT_INST( \
11641164
n, \
11651165
&rf2xx_init, \
11661166
NULL, \
11671167
&rf2xx_ctx_data_##n, \
11681168
&rf2xx_ctx_config_##n, \
1169-
CONFIG_IEEE802154_RF2XX_INIT_PRIO, \
11701169
&rf2xx_radio_api, \
11711170
L2, \
11721171
L2_CTX_TYPE, \

0 commit comments

Comments
 (0)