Oops, HPET ID optionally stored in _UID, not in _ADR.

This commit is contained in:
Alexander Motin 2010-05-23 08:31:15 +00:00
parent 9fcd375657
commit b169c85e20

View File

@ -107,7 +107,7 @@ acpi_hpet_find(ACPI_HANDLE handle, UINT32 level, void *context,
{
char **ids;
uint32_t id = (uint32_t)(uintptr_t)context;
uint32_t adr = 0;
uint32_t uid = 0;
for (ids = hpet_ids; *ids != NULL; ids++) {
if (acpi_MatchHid(handle, *ids))
@ -115,9 +115,9 @@ acpi_hpet_find(ACPI_HANDLE handle, UINT32 level, void *context,
}
if (*ids == NULL)
return (AE_OK);
if (ACPI_FAILURE(acpi_GetInteger(handle, "_ADR", &adr)))
adr = 0;
if (id == adr)
if (ACPI_FAILURE(acpi_GetInteger(handle, "_UID", &uid)))
uid = 0;
if (id == uid)
*((int *)status) = 1;
return (AE_OK);
}