linux/drivers/media/usb/usbvision
Gustavo A. R. Silva 830a45a2f4 media: usbvision: constify i2c_algorithm structure
Check for i2c_algorithm structures that are only stored in
the algo field of an i2c_adapter structure. This field is
declared const, so i2c_algorithm structures that have this
property can be declared as const also.

This issue was identified using Coccinelle and the following
semantic patch:

@r disable optional_qualifier@
identifier i;
position p;
@@
static struct i2c_algorithm i@p = { ... };

@ok@
identifier r.i;
struct i2c_adapter e;
position p;
@@
e.algo = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct i2c_algorithm i = { ... };

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-20 14:53:00 -04:00
..
Kconfig
Makefile
usbvision-cards.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
usbvision-cards.h
usbvision-core.c [media] media/usbvision: remove ctrl_urb_wq 2017-02-03 13:40:20 -02:00
usbvision-i2c.c media: usbvision: constify i2c_algorithm structure 2017-07-20 14:53:00 -04:00
usbvision-video.c [media] usbvision: add missing USB-descriptor endianness conversions 2017-06-06 07:43:02 -03:00
usbvision.h [media] media/usbvision: remove ctrl_urb_wq 2017-02-03 13:40:20 -02:00