svn commit: r277768 - stable/10/sys/dev/acpica
Jung-uk Kim
jkim at FreeBSD.org
Mon Jan 26 19:27:31 UTC 2015
Author: jkim
Date: Mon Jan 26 19:27:30 2015
New Revision: 277768
URL: https://svnweb.freebsd.org/changeset/base/277768
Log:
MFC: r277594
Simplify retry loops.
Modified:
stable/10/sys/dev/acpica/acpi_ec.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/acpica/acpi_ec.c
==============================================================================
--- stable/10/sys/dev/acpica/acpi_ec.c Mon Jan 26 19:25:35 2015 (r277767)
+++ stable/10/sys/dev/acpica/acpi_ec.c Mon Jan 26 19:27:30 2015 (r277768)
@@ -648,10 +648,8 @@ EcGpeQueryHandler(void *Context)
Status = EcCommand(sc, EC_COMMAND_QUERY);
if (ACPI_SUCCESS(Status))
break;
- if (ACPI_SUCCESS(EcCheckStatus(sc, "retr_check",
+ if (ACPI_FAILURE(EcCheckStatus(sc, "retr_check",
EC_EVENT_INPUT_BUFFER_EMPTY)))
- continue;
- else
break;
}
sc->ec_sci_pend = FALSE;
@@ -966,15 +964,13 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A
gen_count = sc->ec_gencount;
EC_SET_DATA(sc, Address);
status = EcWaitEvent(sc, EC_EVENT_OUTPUT_BUFFER_FULL, gen_count);
- if (ACPI_FAILURE(status)) {
- if (ACPI_SUCCESS(EcCheckStatus(sc, "retr_check",
- EC_EVENT_INPUT_BUFFER_EMPTY)))
- continue;
- else
- break;
+ if (ACPI_SUCCESS(status)) {
+ *Data = EC_GET_DATA(sc);
+ return (AE_OK);
}
- *Data = EC_GET_DATA(sc);
- return (AE_OK);
+ if (ACPI_FAILURE(EcCheckStatus(sc, "retr_check",
+ EC_EVENT_INPUT_BUFFER_EMPTY)))
+ break;
}
device_printf(sc->ec_dev, "EcRead: failed waiting to get data\n");
return (status);
More information about the svn-src-stable
mailing list