diff options
| author | Rasmus Villemoes <[email protected]> | 2022-09-27 09:45:44 +0200 |
|---|---|---|
| committer | Stefan Roese <[email protected]> | 2022-09-27 12:25:40 +0200 |
| commit | 51443c9a499989f698a2921e72156713fe1a6bc2 (patch) | |
| tree | f25cd671298b258cfdcc6e4d223388705feb1f1f /doc/develop/python_cq.rst | |
| parent | f117c54cc83e3c519883edb5a48062644d38c443 (diff) | |
watchdog: gpio_wdt: use __udelay() to avoid recursion
The udelay() function in lib/time.c contains a WATCHDOG_RESET()
call. The only reason this doesn't lead to a catastrophic infinite
recursion is due to the rate-limiting in wdt-uclass.c:
if (time_after_eq(now, priv->next_reset)) {
priv->next_reset = now + priv->reset_period;
wdt_reset(dev);
}
But this would fall apart if ->next_reset was updated after calling the
device's reset method.
This is needlessly fragile, and it's easy enough to avoid that
recursion in the first place by just using __udelay() directly.
Signed-off-by: Rasmus Villemoes <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Diffstat (limited to 'doc/develop/python_cq.rst')
0 files changed, 0 insertions, 0 deletions
