thermal/drivers/rcar_thermal: Constify static thermal_zone_device_ops
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Fri, 9 Sep 2022 18:28:38 +0000 (19:28 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 4 Oct 2022 09:21:18 +0000 (11:21 +0200)
The only usage of rcar_thermal_zone_of_ops is to pass its address to
devm_thermal_of_zone_register(), which takes a pointer to const struct
thermal_zone_device_ops. Make it const to allow the compiler to put
it in read-only memory.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20220909182838.11154-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/rcar_thermal.c

index 4df42d70d867df955248b0f146eaefd256f212a0..61c2b8855cb8dc2bee0eede62bdd109c32eef0e8 100644 (file)
@@ -316,7 +316,7 @@ static int rcar_thermal_get_trip_temp(struct thermal_zone_device *zone,
        return 0;
 }
 
-static struct thermal_zone_device_ops rcar_thermal_zone_of_ops = {
+static const struct thermal_zone_device_ops rcar_thermal_zone_of_ops = {
        .get_temp       = rcar_thermal_get_temp,
 };