diff options
author | Nate Lawson <njl@FreeBSD.org> | 2005-03-20 03:51:18 +0000 |
---|---|---|
committer | Nate Lawson <njl@FreeBSD.org> | 2005-03-20 03:51:18 +0000 |
commit | 6638c61aa6335cabefdac11cb0918c01d83e48c9 (patch) | |
tree | 405283f985b89ac4bf100b5d71363611023530a5 /sys/dev/acpica/acpi_perf.c | |
parent | ca9ac06c99bfd0150b85d4d83c396ce6237c0e05 (diff) | |
download | src-6638c61aa6335cabefdac11cb0918c01d83e48c9.tar.gz src-6638c61aa6335cabefdac11cb0918c01d83e48c9.zip |
Attach acpi_perf early. Especially when it is being used to provide info
to other devices, it needs to be attached first. (Multi-pass newbus
probes would be a better solution.)
Notes
Notes:
svn path=/head/; revision=143865
Diffstat (limited to 'sys/dev/acpica/acpi_perf.c')
-rw-r--r-- | sys/dev/acpica/acpi_perf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index 629f036434b0..0fc67ca71c3a 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -141,6 +141,7 @@ static void acpi_perf_identify(driver_t *driver, device_t parent) { ACPI_HANDLE handle; + device_t dev; /* Make sure we're not being doubly invoked. */ if (device_find_child(parent, "acpi_perf", -1) != NULL) @@ -156,8 +157,12 @@ acpi_perf_identify(driver_t *driver, device_t parent) /* * Add a child to every CPU that has the right methods. In future * versions of the ACPI spec, CPUs can have different settings. + * We probe this child now so that other devices that depend + * on it (i.e., for info about supported states) will see it. */ - if (BUS_ADD_CHILD(parent, 0, "acpi_perf", -1) == NULL) + if ((dev = BUS_ADD_CHILD(parent, 0, "acpi_perf", -1)) != NULL) + device_probe_and_attach(dev); + else device_printf(parent, "add acpi_perf child failed\n"); } |