linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops
@ 2021-09-20 20:38 Rikard Falkeborn
  2021-09-22 11:01 ` Shenhar, Talel
  2021-10-05 14:36 ` [PATCH] " Rafael J. Wysocki
  0 siblings, 2 replies; 4+ messages in thread
From: Rikard Falkeborn @ 2021-09-20 20:38 UTC (permalink / raw)
  To: Talel Shenhar, Daniel Lezcano
  Cc: Zhang Rui, Amit Kucheria, linux-pm, linux-kernel, Rikard Falkeborn

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>
---
 drivers/thermal/thermal_mmio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
index ded1dd0d4ef7..360b0dfdc3b0 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,
 };
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-05 16:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 20:38 [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops Rikard Falkeborn
2021-09-22 11:01 ` Shenhar, Talel
2021-10-05 14:36 ` [PATCH] " Rafael J. Wysocki
2021-10-05 16:51   ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).