summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@googlemail.com>2021-11-30 04:27:18 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-12-07 10:24:01 +0300
commitb85a4d9628341c6a790354a28fd45c2cf7741273 (patch)
tree54c0f6199611c77650a282757fee2192dfa6b9a3 /drivers/input
parentfafc66387dc069140e52739c0c86c8169d44c2dc (diff)
downloadlinux-b85a4d9628341c6a790354a28fd45c2cf7741273.tar.xz
Input: palmas-pwrbutton - make a couple of arrays static const
Don't populate a couple of arrays on the stack but instead make them static const. Also makes the object code smaller by a few hundred bytes. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20211129231749.619469-1-colin.i.king@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/palmas-pwrbutton.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c
index 1e71336f5cf9..2213e06b611d 100644
--- a/drivers/input/misc/palmas-pwrbutton.c
+++ b/drivers/input/misc/palmas-pwrbutton.c
@@ -116,8 +116,8 @@ static void palmas_pwron_params_ofinit(struct device *dev,
struct device_node *np;
u32 val;
int i, error;
- u8 lpk_times[] = { 6, 8, 10, 12 };
- int pwr_on_deb_ms[] = { 15, 100, 500, 1000 };
+ static const u8 lpk_times[] = { 6, 8, 10, 12 };
+ static const int pwr_on_deb_ms[] = { 15, 100, 500, 1000 };
memset(config, 0, sizeof(*config));