diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2024-07-14 13:58:58 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2024-07-14 13:58:58 +0000 |
commit | f3629725cb9d77ac83a8f89684c9437594b30b02 (patch) | |
tree | 4ec8adac580756ad2338425cd05e9e858608ef5b /sys/dev | |
parent | 673c641e1e58c8c7da39708dfea35dc8879d9884 (diff) |
For specific hids (currently only ACPI0007, acpicpu(4)), use a print
function that always returns QUIET so instances that don't get matched
are not reported.
ok kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 37e4d5b11f9..20aa4b9c2a0 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.434 2024/07/14 10:50:39 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.435 2024/07/14 13:58:57 jmatthew Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -65,6 +65,7 @@ void acpi_pci_set_powerstate(pci_chipset_tag_t, pcitag_t, int, int); int acpi_pci_notify(struct aml_node *, int, void *); int acpi_submatch(struct device *, void *, void *); +int acpi_noprint(void *, const char *); int acpi_print(void *, const char *); void acpi_map_pmregs(struct acpi_softc *); @@ -1317,6 +1318,12 @@ acpi_submatch(struct device *parent, void *match, void *aux) } int +acpi_noprint(void *aux, const char *pnp) +{ + return (QUIET); +} + +int acpi_print(void *aux, const char *pnp) { struct acpi_attach_args *aa = aux; @@ -3010,6 +3017,12 @@ const char *acpi_isa_hids[] = { NULL }; +/* Overly abundant devices to avoid printing details for */ +const char *acpi_quiet_hids[] = { + "ACPI0007", + NULL +}; + void acpi_attach_deps(struct acpi_softc *sc, struct aml_node *node) { @@ -3229,7 +3242,10 @@ acpi_foundhid(struct aml_node *node, void *arg) if (!node->parent->attached) { node->parent->attached = 1; - config_found(self, &aaa, acpi_print); + if (acpi_matchhids(&aaa, acpi_quiet_hids, "none")) + config_found(self, &aaa, acpi_noprint); + else + config_found(self, &aaa, acpi_print); } return (0); |