提交 8152d2a9 编写于 作者: R Rikard Falkeborn 提交者: Daniel Lezcano

thermal/drivers/intel_powerclamp: Constify static thermal_cooling_device_ops

The only usage of powerclamp_cooling_ops is to pass its address to
thermal_cooling_device_register(), which takes a pointer to const struct
thermal_cooling_device_ops. Make it const to allow the compiler to put
it in read-only memory.
Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20211128214641.30953-1-rikard.falkeborn@gmail.comSigned-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
上级 4cf2ddf1
...@@ -641,7 +641,7 @@ static int powerclamp_set_cur_state(struct thermal_cooling_device *cdev, ...@@ -641,7 +641,7 @@ static int powerclamp_set_cur_state(struct thermal_cooling_device *cdev,
} }
/* bind to generic thermal layer as cooling device*/ /* bind to generic thermal layer as cooling device*/
static struct thermal_cooling_device_ops powerclamp_cooling_ops = { static const struct thermal_cooling_device_ops powerclamp_cooling_ops = {
.get_max_state = powerclamp_get_max_state, .get_max_state = powerclamp_get_max_state,
.get_cur_state = powerclamp_get_cur_state, .get_cur_state = powerclamp_get_cur_state,
.set_cur_state = powerclamp_set_cur_state, .set_cur_state = powerclamp_set_cur_state,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册