Skip to content

Commit 11a3899

Browse files
committed
ethernet: Switching ETH_NET_DEVICE_<INIT/DT_INSTANCE>... to new ones
Switching to ETH_NET_DEVICE_INSTANCE, ETH_NET_DEVICE_INSTANCE_FROM_DT_INST and ETH_NET_DEVICE_INSTANCE_MULTI. Thus removing prio and name parameters on all. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent cf4ae2f commit 11a3899

File tree

41 files changed

+89
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+89
-132
lines changed

drivers/ethernet/eth_adin2111.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,10 +1536,8 @@ static const struct ethernet_api adin2111_port_api = {
15361536
.port_idx = port_n, \
15371537
.phy_addr = phy_n, \
15381538
}; \
1539-
ETH_NET_DEVICE_INIT_INSTANCE(name##_port_##port_n, "port_" ADIN2111_XSTR(port_n), \
1540-
port_n, NULL, NULL, &name##_port_data_##port_n, \
1541-
&name##_port_config_##port_n, CONFIG_ETH_INIT_PRIORITY, \
1542-
&adin2111_port_api, NET_ETH_MTU);
1539+
ETH_NET_DEVICE_INSTANCE_MULTI(name##_port_##port_n, port_n, NULL, NULL, &name##_port_data_##port_n,\
1540+
&name##_port_config_##port_n, &adin2111_port_api, NET_ETH_MTU);
15431541

15441542
#define ADIN2111_SPI_OPERATION ((uint16_t)(SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8)))
15451543
#define ADIN2111_MAC_INITIALIZE(inst, dev_id, ifaces, name) \

drivers/ethernet/eth_cyclonev.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,12 +1153,11 @@ const struct ethernet_api eth_cyclonev_api = {.iface_api.init = eth_cyclonev_ifa
11531153
.emac_index = DT_INST_PROP(inst, emac_index), \
11541154
.irq_config = eth_cyclonev_##inst##_irq_config, \
11551155
}; \
1156-
ETH_NET_DEVICE_DT_INST_DEFINE(inst, eth_cyclonev_probe, NULL, \
1157-
&eth_cyclonev_##inst##_data, \
1158-
&eth_cyclonev_##inst##_cfg, \
1159-
CONFIG_ETH_INIT_PRIORITY, \
1160-
&eth_cyclonev_api, \
1161-
NET_ETH_MTU); \
1156+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(inst, eth_cyclonev_probe, NULL,\
1157+
&eth_cyclonev_##inst##_data, \
1158+
&eth_cyclonev_##inst##_cfg, \
1159+
&eth_cyclonev_api, \
1160+
NET_ETH_MTU), \
11621161
\
11631162
static void eth_cyclonev_##inst##_irq_config(void) \
11641163
{ \

drivers/ethernet/eth_dwmac_mmu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ void dwmac_platform_init(struct dwmac_priv *p)
8989
/* Our private device instance */
9090
static struct dwmac_priv dwmac_instance;
9191

92-
ETH_NET_DEVICE_DT_INST_DEFINE(0,
92+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(0,
9393
dwmac_probe,
9494
NULL,
9595
&dwmac_instance,
9696
NULL,
97-
CONFIG_ETH_INIT_PRIORITY,
9897
&dwmac_api,
9998
NET_ETH_MTU);

drivers/ethernet/eth_dwmac_stm32h7x.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,10 @@ void dwmac_platform_init(struct dwmac_priv *p)
121121
/* Our private device instance */
122122
static struct dwmac_priv dwmac_instance;
123123

124-
ETH_NET_DEVICE_DT_INST_DEFINE(0,
124+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(0,
125125
dwmac_probe,
126126
NULL,
127127
&dwmac_instance,
128128
NULL,
129-
CONFIG_ETH_INIT_PRIORITY,
130129
&dwmac_api,
131130
NET_ETH_MTU);

drivers/ethernet/eth_e1000.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,11 @@ static const struct ethernet_api e1000_api = {
307307
.config_func = e1000_config_##inst, \
308308
}; \
309309
\
310-
ETH_NET_DEVICE_DT_INST_DEFINE(inst, \
310+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(inst, \
311311
e1000_probe, \
312312
NULL, \
313313
&dev_##inst, \
314314
&config_##inst, \
315-
CONFIG_ETH_INIT_PRIORITY, \
316315
&e1000_api, \
317316
NET_ETH_MTU);
318317

drivers/ethernet/eth_enc28j60.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,7 @@ static int eth_enc28j60_init(const struct device *dev)
875875
.random_mac = DT_INST_PROP(inst, zephyr_random_mac_address), \
876876
}; \
877877
\
878-
ETH_NET_DEVICE_DT_INST_DEFINE(inst, eth_enc28j60_init, NULL, &eth_enc28j60_runtime_##inst, \
879-
&eth_enc28j60_config_##inst, CONFIG_ETH_INIT_PRIORITY, \
880-
&api_funcs, NET_ETH_MTU);
878+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(inst, eth_enc28j60_init, NULL, &eth_enc28j60_runtime_##inst,\
879+
&eth_enc28j60_config_##inst, &api_funcs, NET_ETH_MTU);
881880

882881
DT_INST_FOREACH_STATUS_OKAY(ENC28J60_DEFINE);

drivers/ethernet/eth_enc424j600.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ static const struct enc424j600_config enc424j600_0_config = {
832832
.timeout = CONFIG_ETH_ENC424J600_TIMEOUT,
833833
};
834834

835-
ETH_NET_DEVICE_DT_INST_DEFINE(0,
835+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(0,
836836
enc424j600_init, NULL,
837837
&enc424j600_0_runtime, &enc424j600_0_config,
838-
CONFIG_ETH_INIT_PRIORITY, &api_funcs, NET_ETH_MTU);
838+
&api_funcs, NET_ETH_MTU);

drivers/ethernet/eth_esp32.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,10 @@ static struct eth_esp32_dev_data eth_esp32_dev = {
400400
.dma = &eth_esp32_dma_data,
401401
};
402402

403-
ETH_NET_DEVICE_DT_INST_DEFINE(0,
403+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(0,
404404
eth_esp32_initialize,
405405
NULL,
406406
&eth_esp32_dev,
407407
NULL,
408-
CONFIG_ETH_INIT_PRIORITY,
409408
&eth_esp32_api,
410409
NET_ETH_MTU);

drivers/ethernet/eth_gecko.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,6 @@ static struct eth_gecko_dev_data eth0_data = {
672672
#endif
673673
};
674674

675-
ETH_NET_DEVICE_DT_INST_DEFINE(0, eth_init,
675+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(0, eth_init,
676676
NULL, &eth0_data, &eth0_config,
677-
CONFIG_ETH_INIT_PRIORITY, &eth_api, ETH_GECKO_MTU);
677+
&eth_api, ETH_GECKO_MTU);

drivers/ethernet/eth_ivshmem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,11 @@ static const struct ethernet_api eth_ivshmem_api = {
419419
.name = "ivshmem_eth" STRINGIFY(inst), \
420420
.generate_mac_addr = generate_mac_addr_##inst, \
421421
}; \
422-
ETH_NET_DEVICE_DT_INST_DEFINE(inst, \
422+
ETH_NET_DEVICE_INSTANCE_FROM_DT_INST(inst, \
423423
eth_ivshmem_initialize, \
424424
NULL, \
425425
&eth_ivshmem_dev_##inst, \
426426
&eth_ivshmem_cfg_##inst, \
427-
CONFIG_ETH_INIT_PRIORITY, \
428427
&eth_ivshmem_api, \
429428
NET_ETH_MTU);
430429

0 commit comments

Comments
 (0)