Skip to content

Commit 2376310

Browse files
pdgendtkartben
authored andcommitted
drivers: mdio: Place API into iterable section
Add wrapper DEVICE_API macro to all mdio_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 712dff5 commit 2376310

14 files changed

+14
-14
lines changed

drivers/ethernet/eth_smsc91x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ static int mdio_smsc_write(const struct device *dev, uint8_t prtad, uint8_t deva
880880
return 0;
881881
}
882882

883-
static const struct mdio_driver_api mdio_smsc_api = {
883+
static DEVICE_API(mdio, mdio_smsc_api) = {
884884
.bus_disable = mdio_smsc_bus_disable,
885885
.bus_enable = mdio_smsc_bus_enable,
886886
.read = mdio_smsc_read,

drivers/mdio/mdio_adin2111.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static void mdio_adin2111_bus_disable(const struct device *dev)
187187
eth_adin2111_unlock(cfg->adin);
188188
}
189189

190-
static const struct mdio_driver_api mdio_adin2111_api = {
190+
static DEVICE_API(mdio, mdio_adin2111_api) = {
191191
.read = mdio_adin2111_read,
192192
.write = mdio_adin2111_write,
193193
.read_c45 = mdio_adin2111_read_c45,

drivers/mdio/mdio_dwcxgmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static int mdio_dwcxgmac_initialize(const struct device *dev)
203203
return 0;
204204
}
205205

206-
static const struct mdio_driver_api mdio_dwcxgmac_driver_api = {
206+
static DEVICE_API(mdio, mdio_dwcxgmac_driver_api) = {
207207
.read = mdio_dwcxgmac_read,
208208
.write = mdio_dwcxgmac_write,
209209
.bus_enable = mdio_dwcxgmac_bus_enable,

drivers/mdio/mdio_esp32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int mdio_esp32_initialize(const struct device *dev)
122122
return res;
123123
}
124124

125-
static const struct mdio_driver_api mdio_esp32_driver_api = {
125+
static DEVICE_API(mdio, mdio_esp32_driver_api) = {
126126
.read = mdio_esp32_read,
127127
.write = mdio_esp32_write,
128128
};

drivers/mdio/mdio_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static int mdio_gpio_initialize(const struct device *dev)
157157
return 0;
158158
}
159159

160-
static const struct mdio_driver_api mdio_gpio_driver_api = {
160+
static DEVICE_API(mdio, mdio_gpio_driver_api) = {
161161
.read = mdio_gpio_read_mmi,
162162
.write = mdio_gpio_write_mmi,
163163
};

drivers/mdio/mdio_litex_liteeth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static int mdio_litex_initialize(const struct device *dev)
152152
return 0;
153153
}
154154

155-
static const struct mdio_driver_api mdio_litex_driver_api = {
155+
static DEVICE_API(mdio, mdio_litex_driver_api) = {
156156
.read = mdio_litex_read_mmi,
157157
.write = mdio_litex_write_mmi,
158158
};

drivers/mdio/mdio_nxp_enet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static int nxp_enet_mdio_write(const struct device *dev,
157157
return ret;
158158
}
159159

160-
static const struct mdio_driver_api nxp_enet_mdio_api = {
160+
static DEVICE_API(mdio, nxp_enet_mdio_api) = {
161161
.read = nxp_enet_mdio_read,
162162
.write = nxp_enet_mdio_write,
163163
};

drivers/mdio/mdio_nxp_enet_qos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static int nxp_enet_qos_mdio_write(const struct device *dev,
144144
return do_transaction(&mdio_write);
145145
}
146146

147-
static const struct mdio_driver_api nxp_enet_qos_mdio_api = {
147+
static DEVICE_API(mdio, nxp_enet_qos_mdio_api) = {
148148
.read = nxp_enet_qos_mdio_read,
149149
.write = nxp_enet_qos_mdio_write,
150150
};

drivers/mdio/mdio_nxp_imx_netc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int nxp_imx_netc_mdio_initialize(const struct device *dev)
8080
return 0;
8181
}
8282

83-
static const struct mdio_driver_api nxp_imx_netc_mdio_api = {
83+
static DEVICE_API(mdio, nxp_imx_netc_mdio_api) = {
8484
.read = nxp_imx_netc_mdio_read,
8585
.write = nxp_imx_netc_mdio_write,
8686
};

drivers/mdio/mdio_nxp_s32_gmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static int mdio_nxp_s32_init(const struct device *dev)
141141
return 0;
142142
}
143143

144-
static const struct mdio_driver_api mdio_nxp_s32_driver_api = {
144+
static DEVICE_API(mdio, mdio_nxp_s32_driver_api) = {
145145
.read = mdio_nxp_s32_read_c22,
146146
.write = mdio_nxp_s32_write_c22,
147147
.read_c45 = mdio_nxp_s32_read_c45,

0 commit comments

Comments
 (0)