Skip to content

Commit

Permalink
thermal/drivers/rcar_thermal: Constify static thermal_zone_device_ops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lad Prabhakar authored and Daniel Lezcano committed Oct 4, 2022
1 parent 34dc523 commit c711436
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/rcar_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down

0 comments on commit c711436

Please sign in to comment.