| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2007 PA Semi, Inc |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Parts based on arch/powerpc/sysdev/fsl_soc.c: |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 2006 (c) MontaVista Software, Inc. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 9 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 11 | | - * option) any later version. |
|---|
| 12 | 8 | */ |
|---|
| 13 | 9 | |
|---|
| 14 | 10 | #include <linux/errno.h> |
|---|
| .. | .. |
|---|
| 60 | 56 | if (!adap_node) |
|---|
| 61 | 57 | continue; |
|---|
| 62 | 58 | |
|---|
| 63 | | - node = NULL; |
|---|
| 64 | | - while ((node = of_get_next_child(adap_node, node))) { |
|---|
| 59 | + for_each_child_of_node(adap_node, node) { |
|---|
| 65 | 60 | struct i2c_board_info info = {}; |
|---|
| 66 | 61 | const u32 *addr; |
|---|
| 67 | 62 | int len; |
|---|