Skip to content

Commit bcab9f9

Browse files
gmarullcfriedt
authored andcommitted
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 <[email protected]>
1 parent 8b95b25 commit bcab9f9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

samples/bluetooth/hci_spi/src/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,7 @@ static int hci_spi_init(const struct device *unused)
279279
return 0;
280280
}
281281

282-
SYS_DEVICE_DEFINE("hci_spi", hci_spi_init,
283-
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
282+
SYS_INIT(hci_spi_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
284283

285284
void main(void)
286285
{

samples/bluetooth/hci_uart/src/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,7 @@ static int hci_uart_init(const struct device *unused)
343343
return 0;
344344
}
345345

346-
SYS_DEVICE_DEFINE("hci_uart", hci_uart_init,
347-
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
346+
SYS_INIT(hci_uart_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
348347

349348
void main(void)
350349
{

0 commit comments

Comments
 (0)