diff --git a/drivers/ethernet/eth_e1000.c b/drivers/ethernet/eth_e1000.c index 31dd7e28b24..178ceb5380d 100644 --- a/drivers/ethernet/eth_e1000.c +++ b/drivers/ethernet/eth_e1000.c @@ -411,7 +411,7 @@ static int ptp_clock_e1000_rate_adjust(const struct device *dev, double ratio) return 0; } -static const struct ptp_clock_driver_api api = { +static DEVICE_API(ptp_clock, api) = { .set = ptp_clock_e1000_set, .get = ptp_clock_e1000_get, .adjust = ptp_clock_e1000_adjust, diff --git a/drivers/ethernet/eth_native_posix.c b/drivers/ethernet/eth_native_posix.c index fdd63cced53..5a5be070c75 100644 --- a/drivers/ethernet/eth_native_posix.c +++ b/drivers/ethernet/eth_native_posix.c @@ -560,7 +560,7 @@ static int ptp_clock_rate_adjust_native_posix(const struct device *clk, return 0; } -static const struct ptp_clock_driver_api api = { +static DEVICE_API(ptp_clock, api) = { .set = ptp_clock_set_native_posix, .get = ptp_clock_get_native_posix, .adjust = ptp_clock_adjust_native_posix, diff --git a/drivers/ethernet/eth_sam_gmac.c b/drivers/ethernet/eth_sam_gmac.c index c7d90bb6e30..e3748a86108 100644 --- a/drivers/ethernet/eth_sam_gmac.c +++ b/drivers/ethernet/eth_sam_gmac.c @@ -2398,7 +2398,7 @@ static int ptp_clock_sam_gmac_rate_adjust(const struct device *dev, return -ENOTSUP; } -static const struct ptp_clock_driver_api ptp_api = { +static DEVICE_API(ptp_clock, ptp_api) = { .set = ptp_clock_sam_gmac_set, .get = ptp_clock_sam_gmac_get, .adjust = ptp_clock_sam_gmac_adjust, diff --git a/drivers/ethernet/eth_stm32_hal.c b/drivers/ethernet/eth_stm32_hal.c index 224ce2f7876..ec46339e8ef 100644 --- a/drivers/ethernet/eth_stm32_hal.c +++ b/drivers/ethernet/eth_stm32_hal.c @@ -1509,7 +1509,7 @@ error: return ret; } -static const struct ptp_clock_driver_api api = { +static DEVICE_API(ptp_clock, api) = { .set = ptp_clock_stm32_set, .get = ptp_clock_stm32_get, .adjust = ptp_clock_stm32_adjust, diff --git a/drivers/ethernet/eth_xmc4xxx.c b/drivers/ethernet/eth_xmc4xxx.c index f2197099e27..02382e681d7 100644 --- a/drivers/ethernet/eth_xmc4xxx.c +++ b/drivers/ethernet/eth_xmc4xxx.c @@ -1113,7 +1113,7 @@ static int eth_xmc4xxx_ptp_clock_rate_adjust(const struct device *dev, double ra return 0; } -static const struct ptp_clock_driver_api ptp_api_xmc4xxx = { +static DEVICE_API(ptp_clock, ptp_api_xmc4xxx) = { .set = eth_xmc4xxx_ptp_clock_set, .get = eth_xmc4xxx_ptp_clock_get, .adjust = eth_xmc4xxx_ptp_clock_adjust, diff --git a/drivers/ethernet/nxp_enet/eth_mcux.c b/drivers/ethernet/nxp_enet/eth_mcux.c index 397fa58bae1..8d8fac6ad4d 100644 --- a/drivers/ethernet/nxp_enet/eth_mcux.c +++ b/drivers/ethernet/nxp_enet/eth_mcux.c @@ -1711,7 +1711,7 @@ static int ptp_clock_mcux_rate_adjust(const struct device *dev, double ratio) return 0; } -static const struct ptp_clock_driver_api api = { +static DEVICE_API(ptp_clock, api) = { .set = ptp_clock_mcux_set, .get = ptp_clock_mcux_get, .adjust = ptp_clock_mcux_adjust, diff --git a/drivers/ptp_clock/ptp_clock_nxp_enet.c b/drivers/ptp_clock/ptp_clock_nxp_enet.c index 96bbdca616e..83129fbd195 100644 --- a/drivers/ptp_clock/ptp_clock_nxp_enet.c +++ b/drivers/ptp_clock/ptp_clock_nxp_enet.c @@ -225,7 +225,7 @@ static void ptp_clock_nxp_enet_isr(const struct device *dev) irq_unlock(irq_lock_key); } -static const struct ptp_clock_driver_api ptp_clock_nxp_enet_api = { +static DEVICE_API(ptp_clock, ptp_clock_nxp_enet_api) = { .set = ptp_clock_nxp_enet_set, .get = ptp_clock_nxp_enet_get, .adjust = ptp_clock_nxp_enet_adjust, diff --git a/tests/net/ptp/clock/src/main.c b/tests/net/ptp/clock/src/main.c index 53d46db76c6..bd59963f574 100644 --- a/tests/net/ptp/clock/src/main.c +++ b/tests/net/ptp/clock/src/main.c @@ -226,7 +226,7 @@ static int my_ptp_clock_rate_adjust(const struct device *dev, double ratio) static struct ptp_context ptp_test_1_context; static struct ptp_context ptp_test_2_context; -static const struct ptp_clock_driver_api api = { +static DEVICE_API(ptp_clock, api) = { .set = my_ptp_clock_set, .get = my_ptp_clock_get, .adjust = my_ptp_clock_adjust,