]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ath11k: constify ath11k_thermal_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Wed, 26 Aug 2020 22:56:08 +0000 (00:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2020 23:21:17 +0000 (16:21 -0700)
The only usage of ath11k_thermal_ops is to pass its address to
thermal_cooling_device_register() which takes a const pointer. 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: David S. Miller <davem@davemloft.net>
drivers/net/wireless/ath/ath11k/thermal.c

index 5a7e150c621be655a2bc4884594e3876ad7c04cc..c96b26f39a2569399a81b0a286c8d12509a1bce9 100644 (file)
@@ -53,7 +53,7 @@ ath11k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev,
        return ret;
 }
 
-static struct thermal_cooling_device_ops ath11k_thermal_ops = {
+static const struct thermal_cooling_device_ops ath11k_thermal_ops = {
        .get_max_state = ath11k_thermal_get_max_throttle_state,
        .get_cur_state = ath11k_thermal_get_cur_throttle_state,
        .set_cur_state = ath11k_thermal_set_cur_throttle_state,