From f5a70d9aa8493564a070f0cf57a572d6f368d482 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Thu, 6 Nov 2008 23:41:29 +0000 Subject: Collapse all sanity checks of hids into one function. Originaly from jordan --- sys/dev/acpi/acpiasus.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sys/dev/acpi/acpiasus.c') 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 @@ -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 -- cgit v1.2.3