From a888ebd9e7c2d68c38efbe89f661468edb699c5f Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Mon, 12 Feb 2018 15:28:41 +0800 Subject: [PATCH] BACKPORT: 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. Change-Id: Ib8f3bddb34ce231375c18ed907f0dc77548b6737 Signed-off-by: Julia Lawall Signed-off-by: Zhang Rui (cherry picked from commit 3fe156f1dd9909fc63d200b4d432884161ad8385) Signed-off-by: Kevin Wangtao --- drivers/thermal/hisi_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index c5285ed34fdd..6d8906d65476 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -227,7 +227,7 @@ static int hisi_thermal_get_temp(void *_sensor, int *temp) return 0; } -static struct thermal_zone_of_device_ops hisi_of_thermal_ops = { +static const struct thermal_zone_of_device_ops hisi_of_thermal_ops = { .get_temp = hisi_thermal_get_temp, };