spi_res_alloc(9) allocate a spi resource that is life-cycle managed during the processing of a spi_message while using spi_transfer_one

SYNOPSIS

void * spi_res_alloc(struct spi_device * spi, spi_res_release_t release, size_t size, gfp_t gfp);

ARGUMENTS

spi

the spi device for which we allocate memory

release

the release code to execute for this resource

size

size to alloc and return

gfp

GFP allocation flags

RETURN

the pointer to the allocated data

This may get enhanced in the future to allocate from a memory pool of the spi_device or spi_master to avoid repeated allocations.

COPYRIGHT