[RFC PATCH 05/11] i2c: core: Avoid config node enumeration

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

 



Add "config" as a common node to add device configuration settings and
other data. This child node should not be treated as a device.
Skip "config" child node during i2c device registration.

Signed-off-by: Krishna Yarlagadda <kyarlagadda@xxxxxxxxxx>
---
 drivers/i2c/i2c-core-of.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index a6c407d36800..f50206c6c4d6 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -98,6 +98,9 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
 		bus = of_node_get(adap->dev.of_node);
 
 	for_each_available_child_of_node(bus, node) {
+		if (!strcmp(node->name, "config"))
+			continue;
+
 		if (of_node_test_and_set_flag(node, OF_POPULATED))
 			continue;
 
-- 
2.43.2





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux