mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
spi: add devm_spi_optimize_message() helper
Merge series from David Lechner <dlechner@baylibre.com>: In the IIO subsystem, we are finding that it is common to call spi_optimize_message() during driver probe since the SPI message doesn't change for the lifetime of the driver. This patch adds a devm_spi_optimize_message() helper to simplify this common pattern.
This commit is contained in:
commit
f01062881f
@ -4384,6 +4384,7 @@ int devm_spi_optimize_message(struct device *dev, struct spi_device *spi,
|
|||||||
|
|
||||||
return devm_add_action_or_reset(dev, devm_spi_unoptimize_message, msg);
|
return devm_add_action_or_reset(dev, devm_spi_unoptimize_message, msg);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(devm_spi_optimize_message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spi_async - asynchronous SPI transfer
|
* spi_async - asynchronous SPI transfer
|
||||||
|
Loading…
Reference in New Issue
Block a user