Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05fa782e authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Mauro Carvalho Chehab
Browse files

media: ec168: Make structure ec168_props constant



The static structure ec168_props, of type dvb_usb_device_properties, is
used only once, when it is assigned to field props of the constant
structure ec168_driver_info. As this means that ec168_props will never be
modified, make it const as well in order to prevent unintended
modification of its fields.
Issue found with Coccinelle.

Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent a37c2efc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ static int ec168_streaming_ctrl(struct dvb_frontend *fe, int onoff)
/* DVB USB Driver stuff */
/* bInterfaceNumber 0 is HID
 * bInterfaceNumber 1 is DVB-T */
static struct dvb_usb_device_properties ec168_props = {
static const struct dvb_usb_device_properties ec168_props = {
	.driver_name = KBUILD_MODNAME,
	.owner = THIS_MODULE,
	.adapter_nr = adapter_nr,