atrtc: Install address space handler for \_SB and its descendant.

SystemCMOS address space is accessible for system wide.
 So install address handler in \_SB space.

Reviewed by: jhb

Differential Revision: https://reviews.freebsd.org/D33892
This commit is contained in:
Takanori Watanabe 2022-01-21 15:32:30 +09:00
parent 5c69be7084
commit eb815a7419

View File

@ -371,7 +371,10 @@ atrtc_reg_acpi_cmos_handler(device_t dev)
if (acpi_disabled("atrtc"))
return (ENXIO);
sc->acpi_handle = acpi_get_handle(dev);
if (ACPI_FAILURE(AcpiGetHandle(ACPI_ROOT_OBJECT, "\\_SB_", &sc->acpi_handle))) {
return (ENXIO);
}
if (sc->acpi_handle == NULL ||
ACPI_FAILURE(AcpiInstallAddressSpaceHandler(sc->acpi_handle,
ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler, NULL, dev))) {