[PATCH 259/379][SRU][OEM-5.6] net: ath11k: constify ath11k_thermal_ops
You-Sheng Yang
vicamo.yang at canonical.com
Wed Dec 23 08:49:52 UTC 2020
From: Rikard Falkeborn <rikard.falkeborn at gmail.com>
BugLink: https://bugs.launchpad.net/bugs/1879633
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 at gmail.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit 31ffcb1077e6c4d36a67c40bccfb6f2bf0132f87)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
drivers/net/wireless/ath/ath11k/thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/thermal.c b/drivers/net/wireless/ath/ath11k/thermal.c
index 5a7e150c621b..c96b26f39a25 100644
--- a/drivers/net/wireless/ath/ath11k/thermal.c
+++ b/drivers/net/wireless/ath/ath11k/thermal.c
@@ -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,
--
2.29.2
More information about the kernel-team
mailing list