samples: bluetooth: hci: replace SYS_DEVICE_DEFINE with SYS_INIT

SYS_INIT can be used for the same purpose, what is being run is simply
an initialization hook.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-12-22 11:51:51 +01:00 committed by Christopher Friedt
commit bcab9f9ac5
2 changed files with 2 additions and 4 deletions

View file

@ -279,8 +279,7 @@ static int hci_spi_init(const struct device *unused)
return 0;
}
SYS_DEVICE_DEFINE("hci_spi", hci_spi_init,
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
SYS_INIT(hci_spi_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
void main(void)
{

View file

@ -343,8 +343,7 @@ static int hci_uart_init(const struct device *unused)
return 0;
}
SYS_DEVICE_DEFINE("hci_uart", hci_uart_init,
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
SYS_INIT(hci_uart_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
void main(void)
{