watchdog: use instance name instead of variable
Do not depend on CONFIG_WDT_DW_DRV_NAME Change-Id: Ib16389b2c64fdaa154f451a5c38bd4a25a0dfba5 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
8328fd5cd0
commit
cee0eb5816
1 changed files with 1 additions and 3 deletions
|
@ -24,8 +24,6 @@
|
||||||
|
|
||||||
uint32_t wdt_fired;
|
uint32_t wdt_fired;
|
||||||
|
|
||||||
#define WDT_DRIVER CONFIG_WDT_DW_DRV_NAME
|
|
||||||
|
|
||||||
/* WDT Requires a callback, there is no interrupt enable / disable. */
|
/* WDT Requires a callback, there is no interrupt enable / disable. */
|
||||||
void wdt_example_cb(struct device *dev)
|
void wdt_example_cb(struct device *dev)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +44,7 @@ void main(void)
|
||||||
wr_cfg.interrupt_fn = wdt_example_cb;
|
wr_cfg.interrupt_fn = wdt_example_cb;
|
||||||
|
|
||||||
wdt_fired = 0;
|
wdt_fired = 0;
|
||||||
wdt_dev = device_get_binding(WDT_DRIVER);
|
wdt_dev = device_get_binding("WATCHDOG");
|
||||||
|
|
||||||
wdt_enable(wdt_dev);
|
wdt_enable(wdt_dev);
|
||||||
wdt_set_config(wdt_dev, &wr_cfg);
|
wdt_set_config(wdt_dev, &wr_cfg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue