soc: qcom: aoss: constify static struct thermal_cooling_device_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Sun, 28 Nov 2021 21:03:17 +0000 (22:03 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 21 Dec 2021 01:10:10 +0000 (19:10 -0600)
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 <rikard.falkeborn@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211128210317.25504-1-rikard.falkeborn@gmail.com
drivers/soc/qcom/qcom_aoss.c

index 34acf58bbb0d6f31c0bc8bcb74d9c6f39b21b7a4..cbe5e39fdaeb0b26f886b07fd805c2acdc7571a5 100644 (file)
@@ -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,