diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-06-08 02:52:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-06-08 02:52:12 +0000 |
commit | 2a62906a2306d3f6f4fb096f2f62c23dadb65d8b (patch) | |
tree | f4262b9e03bd94c4ffcbcdcb55d1cb8d959ab55b | |
parent | a71419aa3b17db755c62ad81fbd73807454cc57b (diff) |
simplify match function; ok toby
-rw-r--r-- | sys/dev/acpi/acpithinkpad.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/acpi/acpithinkpad.c b/sys/dev/acpi/acpithinkpad.c index af3532fc485..6cfc0eb0b70 100644 --- a/sys/dev/acpi/acpithinkpad.c +++ b/sys/dev/acpi/acpithinkpad.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpithinkpad.c,v 1.9 2008/06/06 23:31:42 marco Exp $ */ +/* $OpenBSD: acpithinkpad.c,v 1.10 2008/06/08 02:52:11 deraadt Exp $ */ /* * Copyright (c) 2008 joshua stein <jcs@openbsd.org> @@ -112,18 +112,16 @@ thinkpad_match(struct device *parent, void *match, void *aux) if (aa->aaa_name == NULL || strcmp(aa->aaa_name, cf->cf_driver->cd_name) != 0 || aa->aaa_table != NULL) - goto fail; + return (0); if (aml_evalname((struct acpi_softc *)parent, aa->aaa_node, "MHKV", 0, NULL, &res)) - goto fail; + return (0); - rv = 1; - if (aml_val2int(&res) != THINKPAD_HKEY_VERSION) - rv = 0; + if (aml_val2int(&res) == THINKPAD_HKEY_VERSION) + rv = 1; aml_freevalue(&res); -fail: return (rv); } |