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/acpibat.c | |
parent | 8a3d593d83934938cf8a587690e9a0600aa7202c (diff) |
Collapse all sanity checks of hids into one function.
Originaly from jordan
Diffstat (limited to 'sys/dev/acpi/acpibat.c')
-rw-r--r-- | sys/dev/acpi/acpibat.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/acpi/acpibat.c b/sys/dev/acpi/acpibat.c index 6360c5eb6a0..56cb1746c02 100644 --- a/sys/dev/acpi/acpibat.c +++ b/sys/dev/acpi/acpibat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpibat.c,v 1.52 2008/08/14 14:31:31 robert Exp $ */ +/* $OpenBSD: acpibat.c,v 1.53 2008/11/06 23:41:28 marco Exp $ */ /* * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> * @@ -41,6 +41,8 @@ struct cfdriver acpibat_cd = { NULL, "acpibat", DV_DULL }; +const char *acpibat_hids[] = { ACPI_DEV_CMB, 0 }; + void acpibat_monitor(struct acpibat_softc *); void acpibat_refresh(void *); int acpibat_getbif(struct acpibat_softc *); @@ -54,12 +56,7 @@ acpibat_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, acpibat_hids, cf->cf_driver->cd_name)); } void |