]> Git Repo - J-linux.git/commitdiff
Input: dlink-dir685-touchkeys - make array bl_data static const
authorColin Ian King <[email protected]>
Mon, 10 Oct 2022 18:00:10 +0000 (11:00 -0700)
committerDmitry Torokhov <[email protected]>
Mon, 10 Oct 2022 18:06:56 +0000 (11:06 -0700)
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 <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
drivers/input/keyboard/dlink-dir685-touchkeys.c

index a69dcc3bd30c79673f08e1763c7485bd34b80cfc..3b674001cd15d87ecbb60cf27d47bf2d44ce5ba0 100644 (file)
@@ -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;
 
This page took 0.05244 seconds and 4 git commands to generate.