[PATCH 2/7] drivers: i2c: Only register available devices
Teresa Remmet
t.remmet at phytec.de
Fri Jul 17 04:13:48 PDT 2015
Only register i2c devices from device tree where status is enabled.
Signed-off-by: Teresa Remmet <t.remmet at phytec.de>
---
drivers/i2c/i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
index 5d0fa06..f0df666 100644
--- a/drivers/i2c/i2c.c
+++ b/drivers/i2c/i2c.c
@@ -278,7 +278,7 @@ static void of_i2c_register_devices(struct i2c_adapter *adap)
if (!IS_ENABLED(CONFIG_OFDEVICE) || !adap->dev.device_node)
return;
- for_each_child_of_node(adap->dev.device_node, n) {
+ for_each_available_child_of_node(adap->dev.device_node, n) {
struct i2c_board_info info = {};
struct i2c_client *result;
const __be32 *addr;
--
1.9.1
More information about the barebox
mailing list