linux/drivers/media
Gustavo A. R. Silva c51df136e5 media: zd1301_demod: 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:58:10 -04:00
..
cec media: cec: drop senseless message 2017-07-18 13:00:26 -03:00
common media: saa7146: constify i2c_algorithm structure 2017-07-20 14:55:14 -04:00
dvb-core Linux v4.13-rc1 2017-07-17 11:17:36 -03:00
dvb-frontends media: zd1301_demod: constify i2c_algorithm structure 2017-07-20 14:58:10 -04:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c media: adv7180: add missing adv7180cp, adv7180st i2c device IDs 2017-07-20 06:54:04 -04:00
mmc
pci media: ddbridge: stv0910 single demod mode module option 2017-07-20 13:07:10 -04:00
platform media: marvell-ccic: constify i2c_algorithm structure 2017-07-20 14:55:41 -04:00
radio Linux v4.13-rc1 2017-07-17 11:17:36 -03:00
rc [media] rc-core: cleanup rc_register_device pt2 2017-06-13 13:55:01 -03:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners media: fc001[23]: make const gain table arrays static 2017-07-19 15:12:39 -04:00
usb media: usbvision: constify i2c_algorithm structure 2017-07-20 14:53:00 -04:00
v4l2-core media: v4l: Add support for CSI-1 and CCP2 busses 2017-07-19 15:34:59 -04:00
Kconfig media: cec-pin: add low-level pin hardware support 2017-07-18 12:57:18 -03:00
Makefile [media] cec: select CEC_CORE instead of depend on it 2017-06-04 15:23:33 -03:00
media-device.c [media] media: Rename graph and pipeline structs and functions 2017-01-27 16:13:24 -02:00
media-devnode.c media: utilize new cdev_device_add helper function 2017-03-21 06:44:33 +01:00
media-entity.c [media] media: entity: Catch unbalanced media_pipeline_stop calls 2017-06-23 09:23:36 -03:00