Unverified Commit 3787255c authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mark Brown
Browse files

ASoC: cs42l51: 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.

While at it, also add some space to be consistent with cs42l51_of_match a
few lines below.

On a x86_64, with allmodconfig:
Before:
======
   text	   data	    bss	    dec	    hex	filename
   1551	    384	     16	   1951	    79f	sound/soc/codecs/cs42l51-i2c.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
   1631	    304	     16	   1951	    79f	sound/soc/codecs/cs42l51-i2c.o

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/d5e686f47eddb14245d0fde693ff77ae749f7a08.1731689646.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent dc9f2312
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@

#include "cs42l51.h"

static struct i2c_device_id cs42l51_i2c_id[] = {
static const struct i2c_device_id cs42l51_i2c_id[] = {
	{ "cs42l51" },
	{ }
};