projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc4b156
)
spi: Constify spi_get_drvdata()'s spi parameter
author
Geert Uytterhoeven
<geert+renesas@glider.be>
Mon, 13 Mar 2023 10:58:36 +0000
(11:58 +0100)
committer
Mark Brown
<broonie@kernel.org>
Mon, 13 Mar 2023 14:09:05 +0000
(14:09 +0000)
The "spi" parameter of spi_get_drvdata() can be const.
dev_get_drvdata() has been taking a const pointer since commit
7d1d8999b4bec0ba
("i2c: Constify i2c_get_clientdata's parameter").
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link:
https://lore.kernel.org/r/0f1700ade27a8f3935d04480ff7bef8a887331eb.1678704562.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/spi/spi.h
patch
|
blob
|
history
diff --git
a/include/linux/spi/spi.h
b/include/linux/spi/spi.h
index 6097d2f5126624eb538d5ef8e82d0c550404fee0..e09a61dd34594330ce4b770582eb99b4bdf4a305 100644
(file)
--- a/
include/linux/spi/spi.h
+++ b/
include/linux/spi/spi.h
@@
-261,7
+261,7
@@
static inline void spi_set_drvdata(struct spi_device *spi, void *data)
dev_set_drvdata(&spi->dev, data);
}
-static inline void *spi_get_drvdata(struct spi_device *spi)
+static inline void *spi_get_drvdata(
const
struct spi_device *spi)
{
return dev_get_drvdata(&spi->dev);
}