'\" t .\" Title: driver_attach .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Device drivers infrastructure .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "DRIVER_ATTACH" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Device drivers infrastructure" .\" ----------------------------------------------------------------- .\" * 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" driver_attach \- try to bind driver to devices\&. .SH "SYNOPSIS" .HP \w'int\ driver_attach('u .BI "int driver_attach(struct\ device_driver\ *\ " "drv" ");" .SH "ARGUMENTS" .PP \fIdrv\fR .RS 4 driver\&. .RE .SH "DESCRIPTION" .PP Walk the list of devices that the bus has on it and try to match the driver with each one\&. If \fBdriver_probe_device\fR returns 0 and the \fIdev\fR\->driver is set, we\*(Aqve found a compatible pair\&. .SH "COPYRIGHT" .br