drivers: bluetooth: hci: Place API into iterable section

Add wrapper DEVICE_API macro to all bt_hci_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-11-27 13:03:38 +01:00 committed by Benjamin Cabé
commit e9e64bab35
21 changed files with 21 additions and 21 deletions

View file

@ -564,7 +564,7 @@ static int h4_setup(const struct device *dev, const struct bt_hci_setup_params *
}
#endif
static const struct bt_hci_driver_api h4_driver_api = {
static DEVICE_API(bt_hci, h4_driver_api) = {
.open = h4_open,
.send = h4_send,
#if defined(CONFIG_BT_HCI_SETUP)

View file

@ -801,7 +801,7 @@ static int h5_open(const struct device *dev, bt_hci_recv_t recv)
return 0;
}
static const struct bt_hci_driver_api h5_driver_api = {
static DEVICE_API(bt_hci, h5_driver_api) = {
.open = h5_open,
.send = h5_queue,
};

View file

@ -422,7 +422,7 @@ static int bt_apollo_setup(const struct device *dev, const struct bt_hci_setup_p
return ret;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = bt_apollo_open,
.close = bt_apollo_close,
.send = bt_apollo_send,

View file

@ -495,7 +495,7 @@ static int bt_da1469x_send(const struct device *dev, struct net_buf *buf)
return 0;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = bt_da1469x_open,
.close = bt_da1469x_close,
.send = bt_da1469x_send,

View file

@ -362,7 +362,7 @@ static int bt_esp32_close(const struct device *dev)
return 0;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = bt_esp32_open,
.send = bt_esp32_send,
.close = bt_esp32_close,

View file

@ -299,7 +299,7 @@ done:
return ret ? -EIO : 0;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = cyw208xx_open,
.close = cyw208xx_close,
.send = cyw208xx_send,

View file

@ -265,7 +265,7 @@ static int psoc6_bless_hci_init(const struct device *dev)
return 0;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = psoc6_bless_open,
.send = psoc6_bless_send,
.setup = psoc6_bless_setup,

View file

@ -532,7 +532,7 @@ static int bt_nxp_close(const struct device *dev)
return ret;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = bt_nxp_open,
.setup = bt_nxp_setup,
.close = bt_nxp_close,

View file

@ -252,7 +252,7 @@ void sl_bt_controller_init(void)
/* No extra initialization procedure required */
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = slz_bt_open,
.send = slz_bt_send,
};

View file

@ -693,7 +693,7 @@ static int bt_spi_open(const struct device *dev, bt_hci_recv_t recv)
return 0;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
#if defined(CONFIG_BT_BLUENRG_ACI) && !defined(CONFIG_BT_HCI_RAW)
.setup = bt_spi_bluenrg_setup,
#endif /* CONFIG_BT_BLUENRG_ACI && !CONFIG_BT_HCI_RAW */

View file

@ -488,7 +488,7 @@ static int bt_hci_stm32wb0_open(const struct device *dev, bt_hci_recv_t recv)
return 0;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = bt_hci_stm32wb0_open,
.send = bt_hci_stm32wb0_send,
};

View file

@ -474,7 +474,7 @@ static int bt_hci_stm32wba_setup(const struct device *dev,
}
#endif /* CONFIG_BT_HCI_SETUP */
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
#if defined(CONFIG_BT_HCI_SETUP)
.setup = bt_hci_stm32wba_setup,
#endif

View file

@ -379,7 +379,7 @@ static int bt_ipc_close(const struct device *dev)
return 0;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = bt_ipc_open,
.close = bt_ipc_close,
.send = bt_ipc_send,

View file

@ -618,7 +618,7 @@ static int bt_ipm_close(const struct device *dev)
}
#endif /* CONFIG_BT_HCI_HOST */
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = bt_ipm_open,
#ifdef CONFIG_BT_HCI_HOST
.close = bt_ipm_close,

View file

@ -420,7 +420,7 @@ static int bt_spi_open(const struct device *dev, bt_hci_recv_t recv)
return 0;
}
static const struct bt_hci_driver_api drv = {
static DEVICE_API(bt_hci, drv) = {
.open = bt_spi_open,
.send = bt_spi_send,
};

View file

@ -405,7 +405,7 @@ static int uc_open(const struct device *dev, bt_hci_recv_t recv)
return 0;
}
static const struct bt_hci_driver_api uc_drv_api = {
static DEVICE_API(bt_hci, uc_drv_api) = {
.open = uc_open,
.send = uc_send,
};

View file

@ -900,7 +900,7 @@ static int hci_driver_close(const struct device *dev)
return 0;
}
static const struct bt_hci_driver_api hci_driver_api = {
static DEVICE_API(bt_hci, hci_driver_api) = {
.open = hci_driver_open,
.close = hci_driver_close,
.send = hci_driver_send,

View file

@ -35,7 +35,7 @@ static int driver_send(const struct device *dev, struct net_buf *buf)
return 0;
}
static const struct bt_hci_driver_api driver_api = {
static DEVICE_API(bt_hci, driver_api) = {
.open = driver_open,
.send = driver_send,
};

View file

@ -235,7 +235,7 @@ static int driver_send(const struct device *dev, struct net_buf *buf)
return 0;
}
static const struct bt_hci_driver_api driver_api = {
static DEVICE_API(bt_hci, driver_api) = {
.open = driver_open,
.send = driver_send,
};

View file

@ -37,7 +37,7 @@ static void serial_vnd_data_callback(const struct device *dev, void *user_data);
static int drv_send(const struct device *dev, struct net_buf *buf);
static int drv_open(const struct device *dev, bt_hci_recv_t recv);
static const struct bt_hci_driver_api drv_api = {
static DEVICE_API(bt_hci, drv_api) = {
.open = drv_open,
.send = drv_send,
};

View file

@ -249,7 +249,7 @@ static int driver_send(const struct device *dev, struct net_buf *buf)
return 0;
}
static const struct bt_hci_driver_api driver_api = {
static DEVICE_API(bt_hci, driver_api) = {
.open = driver_open,
.send = driver_send,
};