Skip to content

Commit

Permalink
net: ath11k: constify ath11k_thermal_ops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rikard Falkeborn authored and David S. Miller committed Aug 26, 2020
1 parent 73a9df4 commit 31ffcb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath11k/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 31ffcb1

Please sign in to comment.