mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 16:10:58 +00:00
watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now()
wdt_start() does the "no ->start? return -ENOSYS" check, don't open-code that in wdt_expire_now(). Also, wdt_start() maintains some global (and later some per-device) state, which would get out of sync with this direct method call - not that it matters much here since the board is supposed to reset very soon. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
This commit is contained in:
parent
a85a8e63c5
commit
8967ebb653
1 changed files with 1 additions and 3 deletions
|
@ -120,10 +120,8 @@ int wdt_expire_now(struct udevice *dev, ulong flags)
|
|||
if (ops->expire_now) {
|
||||
return ops->expire_now(dev, flags);
|
||||
} else {
|
||||
if (!ops->start)
|
||||
return -ENOSYS;
|
||||
ret = wdt_start(dev, 1, flags);
|
||||
|
||||
ret = ops->start(dev, 1, flags);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Reference in a new issue