mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
wdt: dw: Switch to if(CONFIG()) instead of using #if
This is preferred over #if because the compiler can check syntax even if the feature is disabled. This cannot be used for CONFIG_CLK because CONFIG_DW_WDT_CLOCK_KHZ is not defined on all platforms. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
cb57811fbc
commit
7d8394366a
@ -136,7 +136,7 @@ static int designware_wdt_probe(struct udevice *dev)
|
||||
priv->clk_khz = CONFIG_DW_WDT_CLOCK_KHZ;
|
||||
#endif
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM_RESET)
|
||||
if (CONFIG_IS_ENABLED(DM_RESET)) {
|
||||
struct reset_ctl_bulk resets;
|
||||
|
||||
ret = reset_get_bulk(dev, &resets);
|
||||
@ -146,7 +146,7 @@ static int designware_wdt_probe(struct udevice *dev)
|
||||
ret = reset_deassert_bulk(&resets);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* reset to disable the watchdog */
|
||||
return designware_wdt_stop(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user