Input: sun4i-ts - constify thermal_zone_of_device_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Tue, 15 Aug 2017 05:10:11 +0000 (22:10 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 15 Aug 2017 05:12:06 +0000 (22:12 -0700)
The thermal_zone_of_device_ops structure is only passed as the fourth
argument to devm_thermal_zone_of_sensor_register, which is declared
as const.  Thus the thermal_zone_of_device_ops structure itself can
be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/sun4i-ts.c

index d07dd29d4848f03d91e40bd762078b969a23bac1..d2e14d9e59753288168d50de4d8e2e880ed40ce3 100644 (file)
@@ -206,7 +206,7 @@ static int sun4i_get_tz_temp(void *data, int *temp)
        return sun4i_get_temp(data, temp);
 }
 
-static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
+static const struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
        .get_temp = sun4i_get_tz_temp,
 };