diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2021-09-20 23:38:49 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2021-10-07 16:18:31 +0300 |
commit | 69c560d2eb3cff7ebe876cd224a3dc05852990b5 (patch) | |
tree | e9b24dd6d983383417f1f88ffc8c3159f2b611ae /drivers/thermal/thermal_mmio.c | |
parent | 5816b3e6577eaa676ceb00a848f0fd65fe2adc29 (diff) | |
download | linux-69c560d2eb3cff7ebe876cd224a3dc05852990b5.tar.xz |
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
Diffstat (limited to 'drivers/thermal/thermal_mmio.c')
-rw-r--r-- | drivers/thermal/thermal_mmio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, }; |