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:
parent
3146a5552f
commit
e9e64bab35
21 changed files with 21 additions and 21 deletions
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue