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

thermal: bcm2835: constify thermal_zone_of_device_ops structures

The thermal_zone_of_device_ops structure is only passed as the fourth
argument to 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>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>

authored by

Julia Lawall and committed by
Zhang Rui
28e6c992 c3c04d9d

+1 -1
+1 -1
drivers/thermal/broadcom/bcm2835_thermal.c
··· 145 145 debugfs_create_regset32("regset", 0444, data->debugfsdir, regset); 146 146 } 147 147 148 - static struct thermal_zone_of_device_ops bcm2835_thermal_ops = { 148 + static const struct thermal_zone_of_device_ops bcm2835_thermal_ops = { 149 149 .get_temp = bcm2835_thermal_get_temp, 150 150 }; 151 151