.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "BUS_FIND_DEVICE" "9" "09 October 2005" "" "" .SH NAME bus_find_device \- device iterator for locating a particular device. .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp struct device * bus_find_device (struct bus_type * \fIbus\fB, struct device * \fIstart\fB, void * \fIdata\fB, int (*\fImatch\fB) struct device *, void *); \fR .SH "ARGUMENTS" .TP \fB\fIbus\fB\fR bus type .TP \fB\fIstart\fB\fR Device to begin with .TP \fB\fIdata\fB\fR Data to pass to match function .TP \fB\fImatch\fB\fR Callback function to check device .SH "DESCRIPTION" .PP This is similar to the \fBbus_for_each_dev\fR function above, but it returns a reference to a device that is 'found' for later use, as determined by the \fImatch\fR callback. .PP 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.