lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211251551030468773@zte.com.cn>
Date:   Fri, 25 Nov 2022 15:51:03 +0800 (CST)
From:   <ye.xingchen@....com.cn>
To:     <wsa@...nel.org>
Cc:     <linux-i2c@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] i2c: Use device_match_of_node()

From: ye xingchen <ye.xingchen@....com.cn>

Replace the open-code with device_match_of_node().

Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
 drivers/i2c/i2c-core-of.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index 3ed74aa4b44b..307a0adf6bc1 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -115,11 +115,11 @@ void of_i2c_register_devices(struct i2c_adapter *adap)

 static int of_dev_or_parent_node_match(struct device *dev, const void *data)
 {
-	if (dev->of_node == data)
+	if (device_match_of_node(dev, data))
 		return 1;

 	if (dev->parent)
-		return dev->parent->of_node == data;
+		return device_match_of_node(dev->parent, data);

 	return 0;
 }
-- 
2.25.1

Powered by blists - more mailing lists