device_for_each_child
Prev | Device Drivers Base | Next

## Name

device_for_each_child — device child iterator.

## Synopsis

`int device_for_each_child (` | struct device * | parent,
| void * | data,
| int (* | fn`(`struct device *, void *`)``)`;

## Arguments

`parent`

  parent struct device.

`data`

  data for the callback.

`fn`

  function to be called for each device.

## Description

Iterate over `parent`'s child devices, and call `fn` for each, passing it `data`.

We check the return of `fn` each time. If it returns anything other than 0, we break out and return that value.

Prev | Up | Next
device_unregister | Home | device_find_child