From: Nishka Dasgupta Date: Mon, 19 Aug 2019 07:38:18 +0000 (-0300) Subject: media: ec168: Make structure ec168_props constant X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=05fa782e2547e2fa2d9233182abdb406605346e0;p=linux.git 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: Nishka Dasgupta Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/dvb-usb-v2/ec168.c b/drivers/media/usb/dvb-usb-v2/ec168.c index 0c1fef118be40..e30305876840f 100644 --- a/drivers/media/usb/dvb-usb-v2/ec168.c +++ b/drivers/media/usb/dvb-usb-v2/ec168.c @@ -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,