Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal: hisilicon: constify thermal_zone_of_device_ops structures

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: Zhang Rui <rui.zhang@intel.com>

authored by

Julia Lawall and committed by
Zhang Rui
3fe156f1 16f73eb0

+1 -1
+1 -1
drivers/thermal/hisi_thermal.c
··· 206 206 return 0; 207 207 } 208 208 209 - static struct thermal_zone_of_device_ops hisi_of_thermal_ops = { 209 + static const struct thermal_zone_of_device_ops hisi_of_thermal_ops = { 210 210 .get_temp = hisi_thermal_get_temp, 211 211 }; 212 212