diff mbox series

[thermal:,thermal/next] thermal/drivers/thermal_mmio: Constify static struct thermal_mmio_ops

Message ID 163455756445.25758.15774779720456234515.tip-bot2@tip-bot2 (mailing list archive)
State Not Applicable, archived
Headers show
Series [thermal:,thermal/next] thermal/drivers/thermal_mmio: Constify static struct thermal_mmio_ops | expand

Commit Message

tip-bot2 for Nam Cao Oct. 18, 2021, 11:46 a.m. UTC
The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     69c560d2eb3cff7ebe876cd224a3dc05852990b5
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//69c560d2eb3cff7ebe876cd224a3dc05852990b5
Author:        Rikard Falkeborn <rikard.falkeborn@gmail.com>
AuthorDate:    Mon, 20 Sep 2021 22:38:49 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 07 Oct 2021 15:18:31 +02:00

thermal/drivers/thermal_mmio: Constify static struct thermal_mmio_ops

The only usage of thermal_mmio_ops is to pass its address to
devm_thermal_zone_of_sensor_register(), which has a pointer to const
struct thermal_zone_of_device_ops as argument. Make it const to allow
the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Talel Shenhar <talel@amazon.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210920203849.32136-1-rikard.falkeborn@gmail.com
---
 drivers/thermal/thermal_mmio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
index ded1dd0..360b0df 100644
--- a/drivers/thermal/thermal_mmio.c
+++ b/drivers/thermal/thermal_mmio.c
@@ -34,7 +34,7 @@  static int thermal_mmio_get_temperature(void *private, int *temp)
 	return 0;
 }
 
-static struct thermal_zone_of_device_ops thermal_mmio_ops = {
+static const struct thermal_zone_of_device_ops thermal_mmio_ops = {
 	.get_temp = thermal_mmio_get_temperature,
 };