git: 9066471175fe - main - acpi_isab: Check the unit in probe instead of using the devclass.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Apr 2022 17:30:00 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=9066471175fed65bf2d956fdf6bb47f8b8ad3141
commit 9066471175fed65bf2d956fdf6bb47f8b8ad3141
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_isab: Check the unit in probe instead of using the devclass.
This is an alternate way to only attach to isab0 for the reasons
described in commit 852989bdbf62932455d48342d9d45dfbab4e65dc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D34991
---
sys/dev/acpica/acpi_isab.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/dev/acpica/acpi_isab.c b/sys/dev/acpica/acpi_isab.c
index 2f9bcd258515..8e305f423b20 100644
--- a/sys/dev/acpica/acpi_isab.c
+++ b/sys/dev/acpica/acpi_isab.c
@@ -93,8 +93,7 @@ acpi_isab_probe(device_t dev)
static char *isa_ids[] = { "PNP0A05", "PNP0A06", NULL };
int rv;
- if (acpi_disabled("isab") ||
- devclass_get_device(isab_devclass, 0) != dev)
+ if (acpi_disabled("isab") || device_get_unit(dev) != 0)
return (ENXIO);
rv = ACPI_ID_PROBE(device_get_parent(dev), dev, isa_ids, NULL);
if (rv <= 0)