diff mbox series

[3/6] spi: Constify spi_get_ctldata()'s spi parameter

Message ID 8960e07adaad8d92d2c3aa045af9ee3c5d2130a8.1678704562.git.geert+renesas@glider.be (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series spi: struct spi_device constification | expand

Commit Message

Geert Uytterhoeven March 13, 2023, 10:58 a.m. UTC
The "spi" parameter of spi_get_ctldata() can be const.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 include/linux/spi/spi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index bdb35a91b4bf0141..6097d2f5126624eb 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -244,7 +244,7 @@  static inline void spi_dev_put(struct spi_device *spi)
 }
 
 /* ctldata is for the bus_controller driver's runtime state */
-static inline void *spi_get_ctldata(struct spi_device *spi)
+static inline void *spi_get_ctldata(const struct spi_device *spi)
 {
 	return spi->controller_state;
 }