From 9dde3e02fdfd3ab65f1a2a704483f552739e7c9b Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Mon, 14 Nov 2016 12:38:28 +0100 Subject: [PATCH] Bluetooth: Fix use of deprecated PRIMARY init level Fix following warning: CC subsys/bluetooth/host/monitor.o In file included from zephyr/include/drivers/loapic.h:58:0, from zephyr/include/drivers/ioapic.h:22, from zephyr/include/drivers/sysapic.h:20, from zephyr/include/arch/x86/irq_controller.h:33, from zephyr/include/arch/x86/arch.h:28, from zephyr/include/arch/cpu.h:23, from zephyr/include/kernel.h:2458, from zephyr/include/zephyr.h:20, from zephyr/subsys/bluetooth/host/monitor.c:24: zephyr/subsys/bluetooth/host/monitor.c: In function '_deprecation_check_sys_init_bt_monitor_init0': zephyr/include/device.h:130:16: warning: '_INIT_LEVEL_PRIMARY' is deprecated [-Wdeprecated-declarations] static struct device_config _CONCAT(__config_, dev_name) __used \ ^ zephyr/include/device.h:245:2: note: in expansion of macro 'DEVICE_AND_API_INIT' DEVICE_AND_API_INIT(dev_name, drv_name, init_fn, data, cfg_info, \ ^ zephyr/include/init.h:69:2: note: in expansion of macro 'DEVICE_INIT' DEVICE_INIT(_SYS_NAME(init_fn), "", init_fn, NULL, NULL, level, prio) ^ zephyr/subsys/bluetooth/host/monitor.c:193:1: note: in expansion of macro 'SYS_INIT' SYS_INIT(bt_monitor_init, PRIMARY, MONITOR_INIT_PRIORITY); ^ zephyr/include/device.h:48:31: note: declared here static __deprecated const int _INIT_LEVEL_PRIMARY = 1; Change-Id: Ie903e3a075f6614b26018be5769be3651f0963be Signed-off-by: Szymon Janc --- subsys/bluetooth/host/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/monitor.c b/subsys/bluetooth/host/monitor.c index 10274077662..818e2adcf1f 100644 --- a/subsys/bluetooth/host/monitor.c +++ b/subsys/bluetooth/host/monitor.c @@ -190,4 +190,4 @@ static int bt_monitor_init(struct device *d) return 0; } -SYS_INIT(bt_monitor_init, PRIMARY, MONITOR_INIT_PRIORITY); +SYS_INIT(bt_monitor_init, PRE_KERNEL_1, MONITOR_INIT_PRIORITY);