Skip to content

Commit 69c560d

Browse files
rikardfalkeborndlezcano
authored andcommitted
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 <[email protected]> Acked-by: Talel Shenhar <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5816b3e commit 69c560d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/thermal_mmio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static int thermal_mmio_get_temperature(void *private, int *temp)
3434
return 0;
3535
}
3636

37-
static struct thermal_zone_of_device_ops thermal_mmio_ops = {
37+
static const struct thermal_zone_of_device_ops thermal_mmio_ops = {
3838
.get_temp = thermal_mmio_get_temperature,
3939
};
4040

0 commit comments

Comments
 (0)