summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_acad.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_acad.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_acad.c')
-rw-r--r--sys/dev/acpica/acpi_acad.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/acpica/acpi_acad.c b/sys/dev/acpica/acpi_acad.c
index 6063a71..b4422b8 100644
--- a/sys/dev/acpica/acpi_acad.c
+++ b/sys/dev/acpica/acpi_acad.c
@@ -42,6 +42,8 @@
#include "acpi.h"
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpiio.h>
+#include <isa/isavar.h>
+#include <isa/pnpvar.h>
/* Hooks for the ACPI CA debugging infrastructure */
#define _COMPONENT ACPI_AC_ADAPTER
@@ -136,12 +138,14 @@ acpi_acad_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
static int
acpi_acad_probe(device_t dev)
{
- if (acpi_get_type(dev) == ACPI_TYPE_DEVICE && !acpi_disabled("acad") &&
- acpi_MatchHid(acpi_get_handle(dev), "ACPI0003")) {
- device_set_desc(dev, "AC Adapter");
- return (0);
- }
- return (ENXIO);
+ static char *acad_ids[] = { "ACPI0003", NULL };
+
+ if (acpi_disabled("acad") ||
+ ACPI_ID_PROBE(device_get_parent(dev), dev, acad_ids) == NULL)
+ return (ENXIO);
+
+ device_set_desc(dev, "AC Adapter");
+ return (0);
}
static int
OpenPOWER on IntegriCloud