thermal: broadcom: constify thermal_zone_of_device_ops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Tue, 30 Oct 2018 15:15:00 +0000 (16:15 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 5 Dec 2018 14:47:46 +0000 (06:47 -0800)
The thermal_zone_of_device_ops structure can be const as it is only
passed as the last argument of thermal_zone_of_sensor_register
and the corresponding parameter is declared as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/broadcom/brcmstb_thermal.c

index 1919f91fa756597ff63f6e1518d92363f402e769..e8b1570cc3888a3eff4e066c324a3d3c4d10b95c 100644 (file)
@@ -299,7 +299,7 @@ static int brcmstb_set_trips(void *data, int low, int high)
        return 0;
 }
 
-static struct thermal_zone_of_device_ops of_ops = {
+static const struct thermal_zone_of_device_ops of_ops = {
        .get_temp       = brcmstb_get_temp,
        .set_trips      = brcmstb_set_trips,
 };