summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_cmbat.c
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-06-29 19:02:27 +0000
committernjl <njl@FreeBSD.org>2004-06-29 19:02:27 +0000
commit72ad681e8442865d104086e9a6961818cc435085 (patch)
tree6f1a0ff9b933c25a9eb2bf967f62e708efe64c5f /sys/dev/acpica/acpi_cmbat.c
parent2a43f50bb099f7154fa37e95153f1432d00c8667 (diff)
downloadFreeBSD-src-72ad681e8442865d104086e9a6961818cc435085.zip
FreeBSD-src-72ad681e8442865d104086e9a6961818cc435085.tar.gz
Use the acpi_id_probe() method instead of acpi_MatchHid(), which is now
static.
Diffstat (limited to 'sys/dev/acpica/acpi_cmbat.c')
-rw-r--r--sys/dev/acpica/acpi_cmbat.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/acpica/acpi_cmbat.c b/sys/dev/acpica/acpi_cmbat.c
index 6f81c44..d0f6f03 100644
--- a/sys/dev/acpica/acpi_cmbat.c
+++ b/sys/dev/acpica/acpi_cmbat.c
@@ -291,13 +291,14 @@ acpi_cmbat_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
static int
acpi_cmbat_probe(device_t dev)
{
- if (acpi_get_type(dev) == ACPI_TYPE_DEVICE && !acpi_disabled("cmbat")
- && acpi_MatchHid(acpi_get_handle(dev), "PNP0C0A")) {
+ static char *cmbat_ids[] = { "PNP0C0A", NULL };
- device_set_desc(dev, "Control Method Battery");
- return (0);
- }
- return (ENXIO);
+ if (acpi_disabled("cmbat") ||
+ ACPI_ID_PROBE(device_get_parent(dev), dev, cmbat_ids) == NULL)
+ return (ENXIO);
+
+ device_set_desc(dev, "Control Method Battery");
+ return (0);
}
static int
OpenPOWER on IntegriCloud