summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2019-12-05 06:28:09 +0000
committermlelstv <mlelstv@NetBSD.org>2019-12-05 06:28:09 +0000
commit38c8f95f2b993e69e113f03c216bbd3b73607023 (patch)
treef080715f4d77970f0a77ef6b3f9f6d769f7623c4 /sys/dev
parentd59825de20ffb5e123dfd7e5ea87cbc071a61727 (diff)
Revert previous. Indirect matches are not wanted on platforms that
use external configuration data (FDT or OF).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/i2c/i2c.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/i2c/i2c.c b/sys/dev/i2c/i2c.c
index fc5ca267d1d..ac46efc5f90 100644
--- a/sys/dev/i2c/i2c.c
+++ b/sys/dev/i2c/i2c.c
@@ -1,4 +1,4 @@
-/* $NetBSD: i2c.c,v 1.69 2019/03/26 09:20:38 mlelstv Exp $ */
+/* $NetBSD: i2c.c,v 1.70 2019/12/05 06:28:09 mlelstv Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.69 2019/03/26 09:20:38 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.70 2019/12/05 06:28:09 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -719,8 +719,6 @@ iic_use_direct_match(const struct i2c_attach_args *ia, const cfdata_t cf,
const struct device_compatible_entry *compats,
int *match_resultp)
{
- int res;
-
KASSERT(match_resultp != NULL);
if (ia->ia_name != NULL &&
@@ -730,11 +728,8 @@ iic_use_direct_match(const struct i2c_attach_args *ia, const cfdata_t cf,
}
if (ia->ia_ncompat > 0 && ia->ia_compat != NULL) {
- res = iic_compatible_match(ia, compats, NULL);
- if (res) {
- *match_resultp = res;
- return true;
- }
+ *match_resultp = iic_compatible_match(ia, compats, NULL);
+ return true;
}
return false;