spi: only register enabled child nodes
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
This commit is contained in:
parent
d4defe9190
commit
c0a4bb242b
|
@ -113,7 +113,7 @@ static void spi_of_register_slaves(struct spi_master *master)
|
||||||
if (!node)
|
if (!node)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for_each_child_of_node(node, n) {
|
for_each_available_child_of_node(node, n) {
|
||||||
memset(&chip, 0, sizeof(chip));
|
memset(&chip, 0, sizeof(chip));
|
||||||
chip.name = xstrdup(n->name);
|
chip.name = xstrdup(n->name);
|
||||||
chip.bus_num = master->bus_num;
|
chip.bus_num = master->bus_num;
|
||||||
|
|
Loading…
Reference in New Issue