devm_spi_optimize_message() is a public function and needs
EXPORT_SYMBOL_GPL.
Reported-by: Jonathan Cameron <jic23@kernel.org>
Closes: https://lore.kernel.org/linux-iio/20240624204424.6a91a5e4@jic23-huawei/
Fixes: 17436001a6bc ("spi: add devm_spi_optimize_message() helper")
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/spi/spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 3f953504244b..814d66fc9753 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -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);
}
+EXPORT_SYMBOL_GPL(devm_spi_optimize_message);
/**
* spi_async - asynchronous SPI transfer
--
2.45.2
On Mon, Jun 24, 2024 at 03:10:30PM -0500, David Lechner wrote:
> devm_spi_optimize_message() is a public function and needs
> EXPORT_SYMBOL_GPL.
The following changes since commit 6ba59ff4227927d3a8530fc2973b80e94b54d58f:
Linux 6.10-rc4 (2024-06-16 13:40:16 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-devm-optimize
for you to fetch changes up to 7e74a45c7afdd8a9f82d14fd79ae0383bbaaed1e:
spi: add EXPORT_SYMBOL_GPL(devm_spi_optimize_message) (2024-06-24 21:25:57 +0100)
----------------------------------------------------------------
spi: add devm_spi_optimize_message() helper
Helper 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.
----------------------------------------------------------------
David Lechner (3):
Documentation: devres: add missing SPI helpers
spi: add devm_spi_optimize_message() helper
spi: add EXPORT_SYMBOL_GPL(devm_spi_optimize_message)
Documentation/driver-api/driver-model/devres.rst | 3 +++
drivers/spi/spi.c | 28 ++++++++++++++++++++++++
include/linux/spi/spi.h | 2 ++
3 files changed, 33 insertions(+)
On Mon, Jun 24, 2024 at 03:10:30PM -0500, David Lechner wrote:
> Fixes: 17436001a6bc ("spi: add devm_spi_optimize_message() helper")
That's the merge commit for the branch, not the affected commit.
© 2016 - 2025 Red Hat, Inc.