'\" t .\" Title: spi_res_alloc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Serial Peripheral Interface (SPI) .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SPI_RES_ALLOC" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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_res_alloc \- allocate a spi resource that is life\-cycle managed during the processing of a spi_message while using spi_transfer_one .SH "SYNOPSIS" .HP \w'void\ *\ spi_res_alloc('u .BI "void * spi_res_alloc(struct\ spi_device\ *\ " "spi" ", spi_res_release_t\ " "release" ", size_t\ " "size" ", gfp_t\ " "gfp" ");" .SH "ARGUMENTS" .PP \fIspi\fR .RS 4 the spi device for which we allocate memory .RE .PP \fIrelease\fR .RS 4 the release code to execute for this resource .RE .PP \fIsize\fR .RS 4 size to alloc and return .RE .PP \fIgfp\fR .RS 4 GFP allocation flags .RE .SH "RETURN" .PP the pointer to the allocated data .PP This may get enhanced in the future to allocate from a memory pool of the \fIspi_device\fR or \fIspi_master\fR to avoid repeated allocations\&. .SH "COPYRIGHT" .br