mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 18:08:20 +00:00
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 <colin.i.king@gmail.com> Reviewed-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20241022184622.1296044-1-colin.i.king@gmail.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
This commit is contained in:
parent
59e127d58c
commit
62d9748fa1
@ -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)
|
static void lvts_update_irq_mask(struct lvts_ctrl *lvts_ctrl)
|
||||||
{
|
{
|
||||||
u32 masks[] = {
|
static const u32 masks[] = {
|
||||||
LVTS_MONINT_OFFSET_SENSOR0,
|
LVTS_MONINT_OFFSET_SENSOR0,
|
||||||
LVTS_MONINT_OFFSET_SENSOR1,
|
LVTS_MONINT_OFFSET_SENSOR1,
|
||||||
LVTS_MONINT_OFFSET_SENSOR2,
|
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;
|
irqreturn_t iret = IRQ_NONE;
|
||||||
u32 value;
|
u32 value;
|
||||||
u32 masks[] = {
|
static const u32 masks[] = {
|
||||||
LVTS_INT_SENSOR0,
|
LVTS_INT_SENSOR0,
|
||||||
LVTS_INT_SENSOR1,
|
LVTS_INT_SENSOR1,
|
||||||
LVTS_INT_SENSOR2,
|
LVTS_INT_SENSOR2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user