i2c: only register enabled child nodes
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
This commit is contained in:
parent
406123c72f
commit
cda1089054
|
@ -278,7 +278,7 @@ static void of_i2c_register_devices(struct i2c_adapter *adap)
|
||||||
if (!IS_ENABLED(CONFIG_OFDEVICE) || !adap->dev.device_node)
|
if (!IS_ENABLED(CONFIG_OFDEVICE) || !adap->dev.device_node)
|
||||||
return;
|
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_board_info info = {};
|
||||||
struct i2c_client *result;
|
struct i2c_client *result;
|
||||||
const __be32 *addr;
|
const __be32 *addr;
|
||||||
|
|
Loading…
Reference in New Issue