lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] of/i2c: don't register disabled devices
Date
Don't register i2c slave device tree nodes which have
status = "disabled" property.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.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


\
 
 \ /
  Last update: 2013-02-20 20:02    [W:0.035 / U:0.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site