]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: dvb-usb: Constify struct usb_device_id
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 5 Jan 2025 21:19:57 +0000 (22:19 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 21 Feb 2025 09:33:08 +0000 (10:33 +0100)
commit51f76375e3d27177fa211ab653871e5644bcbecb
tree9d609041a7a711634ce175959695f7434e9f54dc
parent19442ed18373366fa649afb81700815626d8dd09
media: dvb-usb: Constify struct usb_device_id

'struct usb_device_id' is not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

In order to do that, struct dvb_usb_device_description (in dvb-usb.h) also
needs to be updated.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
   1983    4240       4    6227    1853 drivers/media/usb/dvb-usb/a800.o

After:
=====
   text    data     bss     dec     hex filename
   2079    4144       4    6227    1853 drivers/media/usb/dvb-usb/a800.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
22 files changed:
drivers/media/usb/dvb-usb/a800.c
drivers/media/usb/dvb-usb/af9005.c
drivers/media/usb/dvb-usb/az6027.c
drivers/media/usb/dvb-usb/cinergyT2-core.c
drivers/media/usb/dvb-usb/cxusb.c
drivers/media/usb/dvb-usb/dibusb-mb.c
drivers/media/usb/dvb-usb/dibusb-mc.c
drivers/media/usb/dvb-usb/digitv.c
drivers/media/usb/dvb-usb/dtt200u.c
drivers/media/usb/dvb-usb/dtv5100.c
drivers/media/usb/dvb-usb/dvb-usb.h
drivers/media/usb/dvb-usb/dw2102.c
drivers/media/usb/dvb-usb/gp8psk.c
drivers/media/usb/dvb-usb/m920x.c
drivers/media/usb/dvb-usb/nova-t-usb2.c
drivers/media/usb/dvb-usb/opera1.c
drivers/media/usb/dvb-usb/pctv452e.c
drivers/media/usb/dvb-usb/technisat-usb2.c
drivers/media/usb/dvb-usb/ttusb2.c
drivers/media/usb/dvb-usb/umt-010.c
drivers/media/usb/dvb-usb/vp702x.c
drivers/media/usb/dvb-usb/vp7045.c