git: e206dddcfe37 - main - acpi_cpu: Use device_get_devclass to find devclass in attach.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 21 Apr 2022 17:29:57 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=e206dddcfe37c7b49a7d4e2d250ffce804ea8aa0

commit e206dddcfe37c7b49a7d4e2d250ffce804ea8aa0
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-21 17:29:13 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-21 17:29:13 +0000

    acpi_cpu: Use device_get_devclass to find devclass in attach.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D34988
---
 sys/dev/acpica/acpi_cpu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index a8bf2ee8cd47..1663609d970b 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -399,7 +399,8 @@ acpi_cpu_attach(device_t dev)
 	sc->cpu_features |= ACPI_CAP_SMP_C1_NATIVE | ACPI_CAP_SMP_C3_NATIVE;
 #endif
 
-    if (devclass_get_drivers(acpi_cpu_devclass, &drivers, &drv_count) == 0) {
+    if (devclass_get_drivers(device_get_devclass(dev), &drivers,
+	&drv_count) == 0) {
 	for (i = 0; i < drv_count; i++) {
 	    if (ACPI_GET_FEATURES(drivers[i], &features) == 0)
 		sc->cpu_features |= features;