diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2007-03-27 21:03:37 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2007-03-27 21:03:37 +0000 |
commit | 2e4f7510d94a26f1cd9ae67ea9c88535cea9c193 (patch) | |
tree | c7550e0408ca0d79f56a9e6d3c0a0ca79a6f86e2 /sys/arm/at91/at91_st.c | |
parent | 2f20235351089bb6e52be91ffa6c7bf6ded46a69 (diff) | |
download | FreeBSD-src-2e4f7510d94a26f1cd9ae67ea9c88535cea9c193.zip FreeBSD-src-2e4f7510d94a26f1cd9ae67ea9c88535cea9c193.tar.gz |
Revisit the watchdogs: Resetting the error to EINVAL after failing to set the
watchdog might hide the succesful arming of an earlier one. Accept that on
failing to arm any watchdog (because of non-supported timeouts) EOPNOTSUPP is
returned instead of the more appropriate EINVAL.
MFC after: 3 days
Diffstat (limited to 'sys/arm/at91/at91_st.c')
-rw-r--r-- | sys/arm/at91/at91_st.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/arm/at91/at91_st.c b/sys/arm/at91/at91_st.c index 6ec9730..9905113 100644 --- a/sys/arm/at91/at91_st.c +++ b/sys/arm/at91/at91_st.c @@ -171,13 +171,11 @@ at91st_watchdog(void *argp, u_int cmd, int *error) int t; t = cmd & WD_INTERVAL; - if (cmd > 0 && t >= 22 && t <= 37) { + if (t >= 22 && t <= 37) { wdog = (1 << (t - 22)) | ST_WDMR_RSTEN; *error = 0; } else { wdog = 0; - if (cmd > 0) - *error = EINVAL; } WR4(ST_WDMR, wdog); WR4(ST_CR, ST_CR_WDRST); |