'\" t .\" Title: spi_alloc_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Serial Peripheral Interface (SPI) .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "SPI_ALLOC_DEVICE" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Serial Peripheral Interface (S" .\" ----------------------------------------------------------------- .\" * 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" spi_alloc_device \- Allocate a new SPI device .SH "SYNOPSIS" .HP \w'struct\ spi_device\ *\ spi_alloc_device('u .BI "struct spi_device * spi_alloc_device(struct\ spi_master\ *\ " "master" ");" .SH "ARGUMENTS" .PP \fImaster\fR .RS 4 Controller to which device is connected .RE .SH "CONTEXT" .PP can sleep .SH "DESCRIPTION" .PP Allows a driver to allocate and initialize a spi_device without registering it immediately\&. This allows a driver to directly fill the spi_device with device parameters before calling \fBspi_add_device\fR on it\&. .PP Caller is responsible to call \fBspi_add_device\fR on the returned spi_device structure to add it to the SPI master\&. If the caller needs to discard the spi_device without adding it, then it should call \fBspi_dev_put\fR on it\&. .PP Returns a pointer to the new device, or NULL\&. .SH "COPYRIGHT" .br