Module Name:    src
Committed By:   mlelstv
Date:           Thu Dec  5 06:28:09 UTC 2019

Modified Files:
        src/sys/dev/i2c: i2c.c

Log Message:
Revert previous. Indirect matches are not wanted on platforms that
use external configuration data (FDT or OF).


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/i2c/i2c.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/i2c.c
diff -u src/sys/dev/i2c/i2c.c:1.69 src/sys/dev/i2c/i2c.c:1.70
--- src/sys/dev/i2c/i2c.c:1.69	Tue Mar 26 09:20:38 2019
+++ src/sys/dev/i2c/i2c.c	Thu Dec  5 06:28:09 2019
@@ -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_at
 		     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_at
 	}
 
 	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;

Reply via email to