'\" t .\" Title: i2c_verify_adapter .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: I2C and SMBus Subsystem .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "I2C_VERIFY_ADAPTER" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "I2C and SMBus Subsystem" .\" ----------------------------------------------------------------- .\" * 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" i2c_verify_adapter \- return parameter as i2c_adapter or NULL .SH "SYNOPSIS" .HP \w'struct\ i2c_adapter\ *\ i2c_verify_adapter('u .BI "struct i2c_adapter * i2c_verify_adapter(struct\ device\ *\ " "dev" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 device, probably from some driver model iterator .RE .SH "DESCRIPTION" .PP When traversing the driver model tree, perhaps using driver model iterators like \fIdevice_for_each_child\fR(), you can\*(Aqt assume very much about the nodes you find\&. Use this function to avoid oopses caused by wrongly treating some non\-I2C device as an i2c_adapter\&. .SH "COPYRIGHT" .br