device_for_each_child(9)

device_for_each_child9

Device child iterator.

Usage

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

Arguments

parent

parent struct device.

data

data for the callback.

fn

function to be called for each device.

Overview

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.

Releases

5 releases since Debian 4.0 (Etch); the text changed 4 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.