summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2008-06-03 15:12:39 +0000
committerjoerg <joerg@NetBSD.org>2008-06-03 15:12:39 +0000
commitbd8a810c44cda2d92fbbc329278b117b943b43e5 (patch)
tree5632b080a0da11b2c8f4fd37d96951755e2d2e42 /sys/dev
parentfc993c6a3633b14ccb37497761c65f23d87cafc4 (diff)
Before 1.46, the EC driver would try to send a command again to the EC
after a timeout. This was removed, but the loops remained, so fix them up as well.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi_ec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpi/acpi_ec.c b/sys/dev/acpi/acpi_ec.c
index 57825c06a69..63d69f9f4d8 100644
--- a/sys/dev/acpi/acpi_ec.c
+++ b/sys/dev/acpi/acpi_ec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_ec.c,v 1.51 2008/02/29 06:35:40 dyoung Exp $ */
+/* $NetBSD: acpi_ec.c,v 1.52 2008/06/03 15:12:39 joerg Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.51 2008/02/29 06:35:40 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.52 2008/06/03 15:12:39 joerg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -582,7 +582,7 @@ acpiec_read(device_t dv, uint8_t addr, uint8_t *val)
sc->sc_state);
return AE_ERROR;
}
- } else while (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
+ } else if (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
mutex_exit(&sc->sc_mtx);
AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_NOT_ISR);
acpiec_unlock(dv);
@@ -631,7 +631,7 @@ acpiec_write(device_t dv, uint8_t addr, uint8_t val)
sc->sc_state);
return AE_ERROR;
}
- } else while (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
+ } else if (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
mutex_exit(&sc->sc_mtx);
AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_NOT_ISR);
acpiec_unlock(dv);