tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH] ihidev: Fix wrong match



Ihidev ends up matching and attaching to unrelated devices. Here is the fix
From 50b896f2758cffe7e04fc76eec72fb31de9c3162 Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder%gmail.com@localhost>
Date: Sun, 30 Jul 2023 17:30:54 +0200
Subject: [PATCH 1/2] ihidev: Fix wrong use of iic_use_direct_match

---
 sys/dev/i2c/ihidev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/i2c/ihidev.c b/sys/dev/i2c/ihidev.c
index 46400cf2b..7bb6da2ee 100644
--- a/sys/dev/i2c/ihidev.c
+++ b/sys/dev/i2c/ihidev.c
@@ -141,7 +141,7 @@ ihidev_match(device_t parent, cfdata_t match, void *aux)
 	int match_result;
 
 	if (iic_use_direct_match(ia, match, compat_data, &match_result))
-		return I2C_MATCH_DIRECT_COMPATIBLE;
+		return match_result;
 
 	return 0;
 }
-- 
2.40.1



Home | Main Index | Thread Index | Old Index