Skip to content

Commit 34e7714

Browse files
tititiou36dtor
authored andcommitted
Input: cypress-sf - constify struct i2c_device_id
'struct i2c_device_id' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 6438 618 0 7056 1b90 drivers/input/keyboard/cypress-sf.o After: ===== text data bss dec hex filename 6502 554 0 7056 1b90 drivers/input/keyboard/cypress-sf.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/4bc3e3b4d10223d9df850fe4ba48f1cefd197082.1731689418.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 470a271 commit 34e7714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/cypress-sf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static int cypress_sf_resume(struct device *dev)
208208
static DEFINE_SIMPLE_DEV_PM_OPS(cypress_sf_pm_ops,
209209
cypress_sf_suspend, cypress_sf_resume);
210210

211-
static struct i2c_device_id cypress_sf_id_table[] = {
211+
static const struct i2c_device_id cypress_sf_id_table[] = {
212212
{ CYPRESS_SF_DEV_NAME },
213213
{ }
214214
};

0 commit comments

Comments
 (0)