From: Rikard Falkeborn Date: Sun, 28 Nov 2021 21:03:17 +0000 (+0100) Subject: soc: qcom: aoss: constify static struct thermal_cooling_device_ops X-Git-Tag: perf_urgent_for_v5.17_rc2~122^2^2~18 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3925b909f75800e69bd1a65130a0440191a9e60a;p=users%2Fdwmw2%2Flinux.git soc: qcom: aoss: constify static struct thermal_cooling_device_ops The only usage of qmp_cooling_device_ops is to pass its address to devm_thermal_of_cooling_device_register() which takes a pointer to const struct thermal_cooling_device_ops as argument. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20211128210317.25504-1-rikard.falkeborn@gmail.com --- diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c index 34acf58bbb0d6..cbe5e39fdaeb0 100644 --- a/drivers/soc/qcom/qcom_aoss.c +++ b/drivers/soc/qcom/qcom_aoss.c @@ -352,7 +352,7 @@ static int qmp_cdev_set_cur_state(struct thermal_cooling_device *cdev, return ret; } -static struct thermal_cooling_device_ops qmp_cooling_device_ops = { +static const struct thermal_cooling_device_ops qmp_cooling_device_ops = { .get_max_state = qmp_cdev_get_max_state, .get_cur_state = qmp_cdev_get_cur_state, .set_cur_state = qmp_cdev_set_cur_state,