---
name: "devres_for_each_res"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/devres_for_each_res"
---

# devres\_for\_each\_res(9)

Resource iterator

## NAME

devres\_for\_each\_res - Resource iterator

## SYNOPSIS

**void devres\_for\_each\_res(struct device \*** *dev***, dr\_release\_t** *release***, dr\_match\_t** *match***, void \*** *match\_data***, void (\****fn***) (struct device \*, void \*, void \*), void \*** *data***);**

## ARGUMENTS

*dev*

Device to iterate resource from

*release*

Look for resources associated with this release function

*match*

Match function (optional)

*match\_data*

Data for the match function

*fn*

Function to be called for each matched resource.

*data*

Data for *fn*, the 3rd parameter of *fn*

## DESCRIPTION

Call *fn* for each devres of *dev* which is associated with *release* and for which *match* returns 1.

## RETURNS

void

## COPYRIGHT
