drivers: watchdog: wdt_mcux: convert to DT_INST defines

Convert driver to use DT_INST_ defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-02-13 12:09:04 -06:00 committed by Kumar Gala
commit c3f4c1d02b

View file

@ -165,10 +165,10 @@ static const struct wdt_driver_api mcux_wdog_api = {
static void mcux_wdog_config_func_0(struct device *dev); static void mcux_wdog_config_func_0(struct device *dev);
static const struct mcux_wdog_config mcux_wdog_config_0 = { static const struct mcux_wdog_config mcux_wdog_config_0 = {
.base = (WDOG_Type *) DT_NXP_KINETIS_WDOG_WATCHDOG0_BASE_ADDRESS, .base = (WDOG_Type *) DT_INST_0_NXP_KINETIS_WDOG_BASE_ADDRESS,
.clock_name = DT_NXP_KINETIS_WDOG_WATCHDOG0_CLOCK_CONTROLLER, .clock_name = DT_INST_0_NXP_KINETIS_WDOG_CLOCK_CONTROLLER,
.clock_subsys = (clock_control_subsys_t) .clock_subsys = (clock_control_subsys_t)
DT_NXP_KINETIS_WDOG_WATCHDOG0_CLOCK_NAME, DT_INST_0_NXP_KINETIS_WDOG_CLOCK_NAME,
.irq_config_func = mcux_wdog_config_func_0, .irq_config_func = mcux_wdog_config_func_0,
}; };
@ -182,9 +182,9 @@ DEVICE_AND_API_INIT(mcux_wdog_0, DT_INST_0_NXP_KINETIS_WDOG_LABEL,
static void mcux_wdog_config_func_0(struct device *dev) static void mcux_wdog_config_func_0(struct device *dev)
{ {
IRQ_CONNECT(DT_NXP_KINETIS_WDOG_WATCHDOG0_IRQ_0, IRQ_CONNECT(DT_INST_0_NXP_KINETIS_WDOG_IRQ_0,
DT_NXP_KINETIS_WDOG_WATCHDOG0_IRQ_0_PRIORITY, DT_INST_0_NXP_KINETIS_WDOG_IRQ_0_PRIORITY,
mcux_wdog_isr, DEVICE_GET(mcux_wdog_0), 0); mcux_wdog_isr, DEVICE_GET(mcux_wdog_0), 0);
irq_enable(DT_NXP_KINETIS_WDOG_WATCHDOG0_IRQ_0); irq_enable(DT_INST_0_NXP_KINETIS_WDOG_IRQ_0);
} }