public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of/i2c: don't register disabled devices
@ 2013-02-20 18:28 Dmitry Eremin-Solenikov
  2013-02-20 19:09 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Eremin-Solenikov @ 2013-02-20 18:28 UTC (permalink / raw)
  To: devicetree-discuss; +Cc: Grant Likely, Rob Herring, linux-kernel

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] of/i2c: don't register disabled devices
  2013-02-20 18:28 [PATCH] of/i2c: don't register disabled devices Dmitry Eremin-Solenikov
@ 2013-02-20 19:09 ` Rob Herring
  2013-02-21  1:32   ` Dmitry Eremin-Solenikov
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2013-02-20 19:09 UTC (permalink / raw)
  To: Dmitry Eremin-Solenikov; +Cc: devicetree-discuss, Grant Likely, linux-kernel

On 02/20/2013 12:28 PM, Dmitry Eremin-Solenikov wrote:
> Don't register i2c slave device tree nodes which have
> status = "disabled" property.
> 

This is already in 3.8.

Rob

> 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) {
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] of/i2c: don't register disabled devices
  2013-02-20 19:09 ` Rob Herring
@ 2013-02-21  1:32   ` Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Eremin-Solenikov @ 2013-02-21  1:32 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss, Grant Likely, linux-kernel

On 20/02/13 23:09, Rob Herring wrote:
> On 02/20/2013 12:28 PM, Dmitry Eremin-Solenikov wrote:
>> Don't register i2c slave device tree nodes which have
>> status = "disabled" property.
>>
> 
> This is already in 3.8.

Ah, true. Sorry for the noise then.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-21  1:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 18:28 [PATCH] of/i2c: don't register disabled devices Dmitry Eremin-Solenikov
2013-02-20 19:09 ` Rob Herring
2013-02-21  1:32   ` Dmitry Eremin-Solenikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox