Skip to content

Commit 28e6c99

Browse files
JuliaLawallzhang-rui
authored andcommitted
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 <[email protected]> Acked-by: Stefan Wahren <[email protected]> Signed-off-by: Zhang Rui <[email protected]>
1 parent c3c04d9 commit 28e6c99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/broadcom/bcm2835_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static void bcm2835_thermal_debugfs(struct platform_device *pdev)
145145
debugfs_create_regset32("regset", 0444, data->debugfsdir, regset);
146146
}
147147

148-
static struct thermal_zone_of_device_ops bcm2835_thermal_ops = {
148+
static const struct thermal_zone_of_device_ops bcm2835_thermal_ops = {
149149
.get_temp = bcm2835_thermal_get_temp,
150150
};
151151

0 commit comments

Comments
 (0)