'\" t .\" Title: usb_for_each_dev .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_FOR_EACH_DEV" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "USB Core APIs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" usb_for_each_dev \- iterate over all USB devices in the system .SH "SYNOPSIS" .HP \w'int\ usb_for_each_dev('u .BI "int usb_for_each_dev(void\ *\ " "data" ", int\ (*" "fn" ")\ (struct\ usb_device\ *,\ void\ *));" .SH "ARGUMENTS" .PP \fIdata\fR .RS 4 data pointer that will be handed to the callback function .RE .PP \fIfn\fR .RS 4 callback function to be called for each USB device .RE .SH "DESCRIPTION" .PP Iterate over all USB devices and call \fIfn\fR for each, passing it \fIdata\fR\&. If it returns anything other than 0, we break the iteration prematurely and return that value\&. .SH "COPYRIGHT" .br