Fix wrong use of ACPI_NO_UNIT_LIMIT which is for as_maxunits, not as_units.

This commit is contained in:
Mitsuru IWASAKI 2002-07-06 13:59:59 +00:00
parent 9a236af3ad
commit c169fc477d

View File

@ -182,7 +182,7 @@ AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT32 Timeout)
"get %d units from semaphore %p (has %d), timeout %d\n",
Units, as, as->as_units, Timeout));
for (;;) {
if (as->as_units == ACPI_NO_UNIT_LIMIT) {
if (as->as_maxunits == ACPI_NO_UNIT_LIMIT) {
result = AE_OK;
break;
}
@ -297,7 +297,7 @@ AcpiOsSignalSemaphore(ACPI_HANDLE Handle, UINT32 Units)
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
"return %d units to semaphore %p (has %d)\n",
Units, as, as->as_units));
if (as->as_units != ACPI_NO_UNIT_LIMIT) {
if (as->as_maxunits != ACPI_NO_UNIT_LIMIT) {
as->as_units += Units;
if (as->as_units > as->as_maxunits)
as->as_units = as->as_maxunits;