From: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
To: devicetree-discuss@lists.ozlabs.org
Cc: Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] of/i2c: don't register disabled devices
Date: Wed, 20 Feb 2013 22:28:24 +0400 [thread overview]
Message-ID: <1361384904-13853-1-git-send-email-dmitry_eremin@mentor.com> (raw)
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
next reply other threads:[~2013-02-20 18:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-20 18:28 Dmitry Eremin-Solenikov [this message]
2013-02-20 19:09 ` [PATCH] of/i2c: don't register disabled devices Rob Herring
2013-02-21 1:32 ` Dmitry Eremin-Solenikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361384904-13853-1-git-send-email-dmitry_eremin@mentor.com \
--to=dmitry_eremin@mentor.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox