mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
SAM Watchdog: Register the watchdog device at the configured device path CONFIG_WATCHDOG_DEVPATH vs. hard-coded /dev/wdt
This commit is contained in:
committed by
Gregory Nutt
parent
9438c42fff
commit
cf5fdf1f8f
@@ -695,7 +695,9 @@ void sam_wdtinitialize(FAR const char *devpath)
|
||||
|
||||
priv->window = priv->reload;
|
||||
|
||||
/* Register the watchdog driver as /dev/watchdog0 */
|
||||
/* Register the watchdog driver, usually at CONFIG_WATCHDOG_DEVPATH
|
||||
* (default /dev/watchdog0).
|
||||
*/
|
||||
|
||||
(void)watchdog_register(devpath, (FAR struct watchdog_lowerhalf_s *)priv);
|
||||
|
||||
|
||||
@@ -687,9 +687,11 @@ int sam_wdt_initialize(void)
|
||||
(void)irq_attach(SAM_IRQ_WDT, sam_interrupt);
|
||||
#endif
|
||||
|
||||
/* Register the watchdog driver as /dev/watchdog0 */
|
||||
/* Register the watchdog driver at the configured location (default
|
||||
* /dev/watchdog0).
|
||||
*/
|
||||
|
||||
(void)watchdog_register("/dev/watchdog0",
|
||||
(void)watchdog_register(CONFIG_WATCHDOG_DEVPATH,
|
||||
(FAR struct watchdog_lowerhalf_s *)priv);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -687,9 +687,11 @@ int sam_wdt_initialize(void)
|
||||
(void)irq_attach(SAM_IRQ_WDT, sam_interrupt);
|
||||
#endif
|
||||
|
||||
/* Register the watchdog driver as /dev/wdt */
|
||||
/* Register the watchdog driver as device-node configured via .config.
|
||||
* Normally /dev/watchdog0
|
||||
*/
|
||||
|
||||
(void)watchdog_register("/dev/wdt",
|
||||
(void)watchdog_register(CONFIG_WATCHDOG_DEVPATH,
|
||||
(FAR struct watchdog_lowerhalf_s *)priv);
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user