Skip to content

Commit f010628

Browse files
committed
spi: add devm_spi_optimize_message() helper
Merge series from David Lechner <[email protected]>: 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.
2 parents 6765e85 + 7e74a45 commit f010628

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/spi/spi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4384,6 +4384,7 @@ int devm_spi_optimize_message(struct device *dev, struct spi_device *spi,
43844384

43854385
return devm_add_action_or_reset(dev, devm_spi_unoptimize_message, msg);
43864386
}
4387+
EXPORT_SYMBOL_GPL(devm_spi_optimize_message);
43874388

43884389
/**
43894390
* spi_async - asynchronous SPI transfer

0 commit comments

Comments
 (0)