Name

devm_spi_alloc_master — resource-managed spi_alloc_master

Synopsis

struct spi_master * devm_spi_alloc_master (struct device * dev,
 unsigned int size);
 

Arguments

dev

physical device of SPI master

size

how much zeroed driver-private data to allocate

Context

can sleep

Description

Allocate an SPI master and automatically release a reference on it when dev is unbound from its driver. Drivers are thus relieved from having to call spi_master_put.

The arguments to this function are identical to spi_alloc_master.

Return

the SPI master structure on success, else NULL.