linux/drivers/media/usb/dvb-usb-v2
Christophe JAILLET d22d91fb1d media: dvb-usb-v2: Constify struct i2c_algorithm
'struct i2c_algorithm' are not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.

More over, dvb_usb_device_properties->i2c_algo seems to only be copied in
i2c_adapter->algo, which is already a "const struct i2c_algorithm".
This is done in dvb_usbv2_i2c_init()

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  35366	   5832	     36	  41234	   a112	drivers/media/usb/dvb-usb-v2/af9015.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  35430	   5768	     36	  41234	   a112	drivers/media/usb/dvb-usb-v2/af9015.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-02-21 10:33:14 +01:00
..
af9015.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
af9015.h
af9035.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
af9035.h
anysee.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
anysee.h
au6610.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
au6610.h
az6007.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
ce6230.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
ce6230.h
dvb_usb.h media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
dvb_usb_common.h
dvb_usb_core.c
dvb_usb_urb.c
dvbsky.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
ec168.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
ec168.h
gl861.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
Kconfig
lmedm04.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
lmedm04.h
Makefile
mxl111sf-demod.c
mxl111sf-demod.h
mxl111sf-gpio.c
mxl111sf-gpio.h
mxl111sf-i2c.c
mxl111sf-i2c.h
mxl111sf-phy.c
mxl111sf-phy.h
mxl111sf-reg.h
mxl111sf-tuner.c
mxl111sf-tuner.h
mxl111sf.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
mxl111sf.h
rtl28xxu.c media: dvb-usb-v2: Constify struct i2c_algorithm 2025-02-21 10:33:14 +01:00
rtl28xxu.h
usb_urb.c
zd1301.c