aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2024-10-22 18:46:22 +0000
committerDaniel Lezcano <[email protected]>2024-11-13 15:17:57 +0000
commit62d9748fa1eea751400518b5ffe6825ce3e48deb (patch)
tree0b309199b1cdda597e3ab2d524639d1ee29a39d2
parentdt-bindings: thermal: qcom-tsens: Add SAR2130P compatible (diff)
downloadkernel-62d9748fa1eea751400518b5ffe6825ce3e48deb.tar.gz
kernel-62d9748fa1eea751400518b5ffe6825ce3e48deb.zip
thermal/drivers/mediatek/lvts_thermal: Make read-only arrays static const
Don't populate the read-only arrays on the stack at run time, instead make them static const. Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Nicolas Pitre <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
-rw-r--r--drivers/thermal/mediatek/lvts_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 1997e91bb3be..ce223bab6b55 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -329,7 +329,7 @@ static int lvts_get_temp(struct thermal_zone_device *tz, int *temp)
static void lvts_update_irq_mask(struct lvts_ctrl *lvts_ctrl)
{
- u32 masks[] = {
+ static const u32 masks[] = {
LVTS_MONINT_OFFSET_SENSOR0,
LVTS_MONINT_OFFSET_SENSOR1,
LVTS_MONINT_OFFSET_SENSOR2,
@@ -424,7 +424,7 @@ static irqreturn_t lvts_ctrl_irq_handler(struct lvts_ctrl *lvts_ctrl)
{
irqreturn_t iret = IRQ_NONE;
u32 value;
- u32 masks[] = {
+ static const u32 masks[] = {
LVTS_INT_SENSOR0,
LVTS_INT_SENSOR1,
LVTS_INT_SENSOR2,