---
name: "bus_find_device"
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/bus_find_device"
---

# bus\_find\_device(9)

device iterator for locating a particular device.

## NAME

bus\_find\_device - device iterator for locating a particular device.

## SYNOPSIS

**struct device \* bus\_find\_device(struct bus\_type \*** *bus***, struct device \*** *start***, void \*** *data***, int (\****match***) (struct device \*dev, void \*data));**

## ARGUMENTS

*bus*

bus type

*start*

Device to begin with

*data*

Data to pass to match function

*match*

Callback function to check device

## DESCRIPTION

This is similar to the **bus\_for\_each\_dev** function above, but it returns a reference to a device that is 'found' for later use, as determined by the *match* callback.

The callback should return 0 if the device doesn't match and non-zero if it does. If the callback returns non-zero, this function will return to the caller and not iterate over any more devices.

## COPYRIGHT
