Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Use acpi_compatible_match().
details: https://anonhg.NetBSD.org/src/rev/2d30dfcd7921
branches: trunk
changeset: 959011:2d30dfcd7921
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Jan 29 02:26:58 2021 +0000
description:
Use acpi_compatible_match().
diffstat:
sys/dev/acpi/nxpiic_acpi.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diffs (43 lines):
diff -r eca39c30ef3d -r 2d30dfcd7921 sys/dev/acpi/nxpiic_acpi.c
--- a/sys/dev/acpi/nxpiic_acpi.c Thu Jan 28 19:46:54 2021 +0000
+++ b/sys/dev/acpi/nxpiic_acpi.c Fri Jan 29 02:26:58 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nxpiic_acpi.c,v 1.3 2021/01/26 00:19:53 jmcneill Exp $ */
+/* $NetBSD: nxpiic_acpi.c,v 1.4 2021/01/29 02:26:58 thorpej Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nxpiic_acpi.c,v 1.3 2021/01/26 00:19:53 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nxpiic_acpi.c,v 1.4 2021/01/29 02:26:58 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -82,9 +82,9 @@
CFATTACH_DECL_NEW(nxpiic_acpi, sizeof(struct nxpiic_softc),
nxpiic_acpi_match, nxpiic_acpi_attach, NULL, NULL);
-static const char * const compatible[] = {
- "NXP0001",
- NULL
+static const struct device_compatible_entry compat_data[] = {
+ { .compat = "NXP0001" },
+ DEVICE_COMPAT_EOL
};
static int
@@ -92,10 +92,7 @@
{
struct acpi_attach_args *aa = aux;
- if (aa->aa_node->ad_type != ACPI_TYPE_DEVICE)
- return 0;
-
- return acpi_match_hid(aa->aa_node->ad_devinfo, compatible);
+ return acpi_compatible_match(aa, compat_data);
}
static void
Home |
Main Index |
Thread Index |
Old Index