'\" t .\" Title: rio_get_device .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: RapidIO driver interface .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "RIO_GET_DEVICE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "RapidIO driver interface" .\" ----------------------------------------------------------------- .\" * 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" rio_get_device \- Begin or continue searching for a RIO device by vid/did .SH "SYNOPSIS" .HP \w'struct\ rio_dev\ *\ rio_get_device('u .BI "struct rio_dev * rio_get_device(u16\ " "vid" ", u16\ " "did" ", struct\ rio_dev\ *\ " "from" ");" .SH "ARGUMENTS" .PP \fIvid\fR .RS 4 RIO vid to match or \fBRIO_ANY_ID\fR to match all vids .RE .PP \fIdid\fR .RS 4 RIO did to match or \fBRIO_ANY_ID\fR to match all dids .RE .PP \fIfrom\fR .RS 4 Previous RIO device found in search, or \fBNULL\fR for new search .RE .SH "DESCRIPTION" .PP Iterates through the list of known RIO devices\&. If a RIO device is found with a matching \fIvid\fR and \fIdid\fR, the reference count to the device is incrememted and a pointer to its device structure is returned\&. Otherwise, \fBNULL\fR is returned\&. A new search is initiated by passing \fBNULL\fR to the \fIfrom\fR argument\&. Otherwise, if \fIfrom\fR is not \fBNULL\fR, searches continue from next device on the global list\&. The reference count for \fIfrom\fR is always decremented if it is not \fBNULL\fR\&. .SH "AUTHOR" .PP \fBMatt Porter\fR <\&mporter@kernel.crashing.org\&>, <\&mporter@mvista.com\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br