* [PATCH] input: palmas-pwrbutton: make a couple of arrays static const
@ 2021-11-29 23:17 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2021-11-29 23:17 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input; +Cc: kernel-janitors, linux-kernel
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>
---
drivers/input/misc/palmas-pwrbutton.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c
index f9b05cf09ff5..1c7ceb20b5af 100644
--- a/drivers/input/misc/palmas-pwrbutton.c
+++ b/drivers/input/misc/palmas-pwrbutton.c
@@ -115,8 +115,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));
--
2.33.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-29 23:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-29 23:17 [PATCH] input: palmas-pwrbutton: make a couple of arrays static const Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).