OF: base: convert and remove device_node_for_nach_child
Remove device_node_for_nach_child and convert users to corresponding imported OF API functions. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
097133af15
commit
2e2265bfd4
|
@ -278,7 +278,7 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
|
|||
if (!IS_ENABLED(CONFIG_OFDEVICE) || !adap->dev.device_node)
|
||||
return;
|
||||
|
||||
device_node_for_nach_child(adap->dev.device_node, n) {
|
||||
for_each_child_of_node(adap->dev.device_node, n) {
|
||||
struct i2c_board_info info = {};
|
||||
struct i2c_client *result;
|
||||
const __be32 *addr;
|
||||
|
|
|
@ -29,7 +29,7 @@ int of_parse_partitions(struct cdev *cdev, struct device_node *node)
|
|||
const char *partname;
|
||||
char *filename;
|
||||
|
||||
device_node_for_nach_child(node, n) {
|
||||
for_each_child_of_node(node, n) {
|
||||
const __be32 *reg;
|
||||
unsigned long offset, size;
|
||||
const char *name;
|
||||
|
|
|
@ -107,7 +107,7 @@ void spi_of_register_slaves(struct spi_master *master, struct device_node *node)
|
|||
struct spi_board_info chip;
|
||||
struct property *reg;
|
||||
|
||||
device_node_for_nach_child(node, n) {
|
||||
for_each_child_of_node(node, n) {
|
||||
memset(&chip, 0, sizeof(chip));
|
||||
chip.name = xstrdup(n->name);
|
||||
chip.bus_num = master->bus_num;
|
||||
|
|
|
@ -80,9 +80,6 @@ struct fdt_header *of_get_fixed_tree(struct device_node *node);
|
|||
|
||||
int of_modalias_node(struct device_node *node, char *modalias, int len);
|
||||
|
||||
#define device_node_for_nach_child(node, child) \
|
||||
list_for_each_entry(child, &node->children, parent_list)
|
||||
|
||||
/* Helper to read a big number; size is in cells (not bytes) */
|
||||
static inline u64 of_read_number(const __be32 *cell, int size)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue