diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2008-11-06 23:41:29 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2008-11-06 23:41:29 +0000 |
commit | f5a70d9aa8493564a070f0cf57a572d6f368d482 (patch) | |
tree | 8c3fdb2eccd218770854cac799d33aa68ec14a62 /sys/dev/acpi/acpiec.c | |
parent | 8a3d593d83934938cf8a587690e9a0600aa7202c (diff) |
Collapse all sanity checks of hids into one function.
Originaly from jordan
Diffstat (limited to 'sys/dev/acpi/acpiec.c')
-rw-r--r-- | sys/dev/acpi/acpiec.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/acpi/acpiec.c b/sys/dev/acpi/acpiec.c index 3f5117540d3..3fb81862c75 100644 --- a/sys/dev/acpi/acpiec.c +++ b/sys/dev/acpi/acpiec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiec.c,v 1.25 2008/06/13 09:13:56 jordan Exp $ */ +/* $OpenBSD: acpiec.c,v 1.26 2008/11/06 23:41:28 marco Exp $ */ /* * Copyright (c) 2006 Can Erkin Acar <canacar@openbsd.org> * @@ -113,6 +113,7 @@ struct cfdriver acpiec_cd = { NULL, "acpiec", DV_DULL }; +const char *acpiec_hids[] = { ACPI_DEV_ECD, 0 }; void acpiec_wait(struct acpiec_softc *sc, u_int8_t mask, u_int8_t val) @@ -264,12 +265,7 @@ acpiec_match(struct device *parent, void *match, void *aux) struct cfdata *cf = match; /* sanity */ - if (aa->aaa_name == NULL || - strcmp(aa->aaa_name, cf->cf_driver->cd_name) != 0 || - aa->aaa_table != NULL) - return (0); - - return (1); + return (acpi_matchhids(aa, acpiec_hids, cf->cf_driver->cd_name)); } void |