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:
@@ -1272,6 +1272,8 @@ static inline void spi_message_free(struct spi_message *m)
|
||||
|
||||
extern int spi_optimize_message(struct spi_device *spi, struct spi_message *msg);
|
||||
extern void spi_unoptimize_message(struct spi_message *msg);
|
||||
extern int devm_spi_optimize_message(struct device *dev, struct spi_device *spi,
|
||||
struct spi_message *msg);
|
||||
|
||||
extern int spi_setup(struct spi_device *spi);
|
||||
extern int spi_async(struct spi_device *spi, struct spi_message *message);
|
||||
|
||||
Reference in New Issue
Block a user