diff options
| author | thorpej <thorpej@NetBSD.org> | 2021-01-27 03:10:18 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2021-01-27 03:10:18 +0000 |
| commit | 8e90f9edc57cba116c1d7d9344aef70a09a0fcbd (patch) | |
| tree | 9738512c77bd45a94ff3b53ff14fb02b6b9eeee9 /sys/dev/fdt/syscon.c | |
| parent | 01632a17d0af21edb06aff4ee852a99a8bf2b595 (diff) | |
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().
Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
Diffstat (limited to 'sys/dev/fdt/syscon.c')
| -rw-r--r-- | sys/dev/fdt/syscon.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/fdt/syscon.c b/sys/dev/fdt/syscon.c index 3ad87e166a1..906453980d6 100644 --- a/sys/dev/fdt/syscon.c +++ b/sys/dev/fdt/syscon.c @@ -1,4 +1,4 @@ -/* $NetBSD: syscon.c,v 1.4 2019/10/28 21:13:48 jmcneill Exp $ */ +/* $NetBSD: syscon.c,v 1.5 2021/01/27 03:10:21 thorpej Exp $ */ /*- * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: syscon.c,v 1.4 2019/10/28 21:13:48 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscon.c,v 1.5 2021/01/27 03:10:21 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -52,10 +52,10 @@ struct syscon_softc { static int syscon_match(device_t, cfdata_t, void *); static void syscon_attach(device_t, device_t, void *); -static const char *compatible[] = { - "syscon", - "simple-mfd", - NULL +static const struct device_compatible_entry compat_data[] = { + { .compat = "syscon" }, + { .compat = "simple-mfd" }, + DEVICE_COMPAT_EOL }; CFATTACH_DECL_NEW(syscon, sizeof(struct syscon_softc), @@ -102,7 +102,7 @@ syscon_match(device_t parent, cfdata_t cf, void *aux) { struct fdt_attach_args * const faa = aux; - return of_match_compatible(faa->faa_phandle, compatible); + return of_compatible_match(faa->faa_phandle, compat_data); } static void |
