diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-10-10 11:00:10 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-10-10 11:06:56 -0700 |
commit | d4a596eddb90114f5f5f32a440057a175517b090 (patch) | |
tree | 34d2602d038a94e7d2a270030aedb7e4074a8424 | |
parent | 48a4dec82f15cc53190c3c8f385700dd9c581dcd (diff) | |
download | lwn-d4a596eddb90114f5f5f32a440057a175517b090.tar.gz lwn-d4a596eddb90114f5f5f32a440057a175517b090.zip |
Input: dlink-dir685-touchkeys - make array bl_data static const
Don't populate the read-only array bl_data on the stack but instead
make it static const. Also makes the object code a little smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20221005154852.320056-1-colin.i.king@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/keyboard/dlink-dir685-touchkeys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/dlink-dir685-touchkeys.c b/drivers/input/keyboard/dlink-dir685-touchkeys.c index a69dcc3bd30c..3b674001cd15 100644 --- a/drivers/input/keyboard/dlink-dir685-touchkeys.c +++ b/drivers/input/keyboard/dlink-dir685-touchkeys.c @@ -62,9 +62,9 @@ static irqreturn_t dir685_tk_irq_thread(int irq, void *data) static int dir685_tk_probe(struct i2c_client *client, const struct i2c_device_id *id) { - struct dir685_touchkeys *tk; + static const u8 bl_data[] = { 0xa7, 0x40 }; struct device *dev = &client->dev; - u8 bl_data[] = { 0xa7, 0x40 }; + struct dir685_touchkeys *tk; int err; int i; |