提交 b85a4d96 编写于 作者: C Colin Ian King 提交者: Dmitry Torokhov

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: NColin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20211129231749.619469-1-colin.i.king@gmail.comSigned-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 fafc6638
...@@ -116,8 +116,8 @@ static void palmas_pwron_params_ofinit(struct device *dev, ...@@ -116,8 +116,8 @@ static void palmas_pwron_params_ofinit(struct device *dev,
struct device_node *np; struct device_node *np;
u32 val; u32 val;
int i, error; int i, error;
u8 lpk_times[] = { 6, 8, 10, 12 }; static const u8 lpk_times[] = { 6, 8, 10, 12 };
int pwr_on_deb_ms[] = { 15, 100, 500, 1000 }; static const int pwr_on_deb_ms[] = { 15, 100, 500, 1000 };
memset(config, 0, sizeof(*config)); memset(config, 0, sizeof(*config));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册