drivers: watchdog: Convert drivers to new DT device macros
Convert watchdog drivers to use new DT variants of the DEVICE APIs. DEVICE_AND_API_INIT -> DEVICE_DT_DEFINE DEVICE_GET -> DEVICE_DT_GET DEVICE_DECLARE -> DEVICE_DT_INST_DECLARE etc.. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
f105455ebe
commit
e376b9417b
13 changed files with 41 additions and 37 deletions
|
@ -151,8 +151,9 @@ static const struct mcux_wdog_config mcux_wdog_config = {
|
|||
|
||||
static struct mcux_wdog_data mcux_wdog_data;
|
||||
|
||||
DEVICE_AND_API_INIT(mcux_wdog, DT_INST_LABEL(0),
|
||||
DEVICE_DT_INST_DEFINE(0,
|
||||
&mcux_wdog_init,
|
||||
device_pm_control_nop,
|
||||
&mcux_wdog_data, &mcux_wdog_config,
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
&mcux_wdog_api);
|
||||
|
@ -161,7 +162,7 @@ static void mcux_wdog_config_func(const struct device *dev)
|
|||
{
|
||||
IRQ_CONNECT(DT_INST_IRQN(0),
|
||||
DT_INST_IRQ(0, priority),
|
||||
mcux_wdog_isr, DEVICE_GET(mcux_wdog), 0);
|
||||
mcux_wdog_isr, DEVICE_DT_INST_GET(0), 0);
|
||||
|
||||
irq_enable(DT_INST_IRQN(0));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue