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/acpiasus.c | |
parent | 8a3d593d83934938cf8a587690e9a0600aa7202c (diff) |
Collapse all sanity checks of hids into one function.
Originaly from jordan
Diffstat (limited to 'sys/dev/acpi/acpiasus.c')
-rw-r--r-- | sys/dev/acpi/acpiasus.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/acpi/acpiasus.c b/sys/dev/acpi/acpiasus.c index 9ec6069a4cf..8940da99bdf 100644 --- a/sys/dev/acpi/acpiasus.c +++ b/sys/dev/acpi/acpiasus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiasus.c,v 1.7 2008/10/01 19:13:57 robert Exp $ */ +/* $OpenBSD: acpiasus.c,v 1.8 2008/11/06 23:41:28 marco Exp $ */ /* $NetBSD: asus_acpi.c,v 1.2.2.2 2008/04/03 12:42:37 mjf Exp $ */ /* * Copyright (c) 2007, 2008 Jared D. McNeill <jmcneill@invisible.ca> @@ -103,18 +103,15 @@ struct cfdriver acpiasus_cd = { NULL, "acpiasus", DV_DULL }; +const char *acpiasus_hids[] = { ACPI_DEV_ASUS, 0 }; + int acpiasus_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aa = aux; struct cfdata *cf = match; - 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, acpiasus_hids, cf->cf_driver->cd_name)); } void |