Skip to contentSkip to conversation

Add warning for unrecognized I2C nodes in the device tree

PATCH Applied Timur Tabi 2 participants 2 messages May 15, 2008 – May 30, 2008 PowerPC

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH 1/1 Add warning for unrecognized I2C nodes in the device tree

Update of_find_i2c_driver in fsl_soc.c to display a warning message if an I2C node in the device tree isn't found in the i2c_devices[] array.

---
 arch/powerpc/sysdev/fsl_soc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/powerpc/sysdev/fsl_soc.c +4 -0
index 3a7054e..a38c364 100644
@@ -448,6 +448,10 @@ static int __init of_find_i2c_driver(struct device_node *node,
 			return -ENOMEM;
 		return 0;
 	}
+
+	pr_warning("fsl_soc.c: unrecognized i2c node %s\n",
+		(const char *) of_get_property(node, "compatible", NULL));
+
 	return -ENODEV;
 }
 
Signature · 1 line
1.5.5
Applied
#1 lore raw
Quoted 7 lines · Timur Tabi

Update of_find_i2c_driver in fsl_soc.c to display a warning message if an I2C node in the device tree isn't found in the i2c_devices[] array.

---
arch/powerpc/sysdev/fsl_soc.c | 4 ++++

1 files changed, 4 insertions(+), 0 deletions(-)

applied.

- k