summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpithinkpad.c
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2008-11-06 23:41:29 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2008-11-06 23:41:29 +0000
commitf5a70d9aa8493564a070f0cf57a572d6f368d482 (patch)
tree8c3fdb2eccd218770854cac799d33aa68ec14a62 /sys/dev/acpi/acpithinkpad.c
parent8a3d593d83934938cf8a587690e9a0600aa7202c (diff)
Collapse all sanity checks of hids into one function.
Originaly from jordan
Diffstat (limited to 'sys/dev/acpi/acpithinkpad.c')
-rw-r--r--sys/dev/acpi/acpithinkpad.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpi/acpithinkpad.c b/sys/dev/acpi/acpithinkpad.c
index bc2500bed14..24f79f76af8 100644
--- a/sys/dev/acpi/acpithinkpad.c
+++ b/sys/dev/acpi/acpithinkpad.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpithinkpad.c,v 1.12 2008/09/22 21:35:48 jcs Exp $ */
+/* $OpenBSD: acpithinkpad.c,v 1.13 2008/11/06 23:41:28 marco Exp $ */
/*
* Copyright (c) 2008 joshua stein <jcs@openbsd.org>
*
@@ -103,6 +103,8 @@ struct cfdriver acpithinkpad_cd = {
NULL, "acpithinkpad", DV_DULL
};
+const char *acpithinkpad_hids[] = { ACPI_DEV_THINKPAD, 0 };
+
int
thinkpad_match(struct device *parent, void *match, void *aux)
{
@@ -111,9 +113,7 @@ thinkpad_match(struct device *parent, void *match, void *aux)
struct aml_value res;
int rv = 0;
- if (aa->aaa_name == NULL ||
- strcmp(aa->aaa_name, cf->cf_driver->cd_name) != 0 ||
- aa->aaa_table != NULL)
+ if (!acpi_matchhids(aa, acpithinkpad_hids, cf->cf_driver->cd_name))
return (0);
if (aml_evalname((struct acpi_softc *)parent, aa->aaa_node,