drivers: ptp_clock: Place API into iterable section
Add wrapper DEVICE_API macro to all ptp_clock_driver_api instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
47ed71ad1d
commit
d76d7115d5
8 changed files with 8 additions and 8 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue