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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1361384904-13853-1-git-send-email-dmitry_eremin@mentor.com>
Date:	Wed, 20 Feb 2013 22:28:24 +0400
From:	Dmitry Eremin-Solenikov <dmitry_eremin@...tor.com>
To:	<devicetree-discuss@...ts.ozlabs.org>
CC:	Grant Likely <grant.likely@...retlab.ca>,
	Rob Herring <rob.herring@...xeda.com>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH] of/i2c: don't register disabled devices

Don't register i2c slave device tree nodes which have
status = "disabled" property.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@...tor.com>
---
 drivers/of/of_i2c.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 1e173f3..63f3236 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -35,6 +35,9 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
 		const __be32 *addr;
 		int len;
 
+		if (!of_device_is_available(node))
+			continue;
+
 		dev_dbg(&adap->dev, "of_i2c: register %s\n", node->full_name);
 
 		if (of_modalias_node(node, info.type, sizeof(info.type)) < 0) {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ