diff options
author | jkim <jkim@FreeBSD.org> | 2010-11-10 18:50:12 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-11-10 18:50:12 +0000 |
commit | d6fa755921a93be58009125a64cd5eae55bb364b (patch) | |
tree | 2cadc89222a2ab98f91b899cbf28ecf00ececf81 /sys/amd64/acpica | |
parent | 97e5fb8f25fa0bd55693c0916ebfa0857913d17d (diff) | |
download | FreeBSD-src-d6fa755921a93be58009125a64cd5eae55bb364b.zip FreeBSD-src-d6fa755921a93be58009125a64cd5eae55bb364b.tar.gz |
Make APM emulation look more closer to its origin. Use device_get_softc(9)
instead of hardcoding acpi(4) unit number as we have device_t for it.
Diffstat (limited to 'sys/amd64/acpica')
-rw-r--r-- | sys/amd64/acpica/acpi_machdep.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/amd64/acpica/acpi_machdep.c b/sys/amd64/acpica/acpi_machdep.c index 1226d00..e33e613 100644 --- a/sys/amd64/acpica/acpi_machdep.c +++ b/sys/amd64/acpica/acpi_machdep.c @@ -61,10 +61,9 @@ acpi_machdep_init(device_t dev) { struct acpi_softc *sc; - sc = devclass_get_softc(devclass_find("acpi"), 0); + sc = device_get_softc(dev); - /* Create a clone for /dev/acpi also. */ - sc->acpi_clone = acpi_apm_create_clone(sc->acpi_dev_t, sc); + acpi_apm_init(sc); if (intr_model != ACPI_INTR_PIC) acpi_SetIntrModel(intr_model); |