alistair23-linux/drivers/iio/adc
Julia Lawall 52ceb7731e iio: adc: men_z188_adc: constify iio_info structures
Check for iio_info structures that are only stored in the info field of a
iio_dev structure.  This field is declared const, so iio_info structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct iio_info i@p = { ... };

@ok@
identifier r.i;
struct iio_dev e;
position p;
@@
e.info = &i@p;

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

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct iio_info i = { ... };
// </smpl>

The result of size on this file before the change is:
   text	      data     bss     dec         hex	  filename
   1529	       312       0    1841         731
   drivers/iio/adc/men_z188_adc.o

and after the change it is:
   text	     data        bss	    dec	    hex	filename
   1689       168          0       1857     741
   drivers/iio/adc/men_z188_adc.o

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-18 11:58:31 +01:00
..
ad799x.c iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999 2016-08-15 15:39:14 +01:00
ad7266.c iio: devm_regulator_get_optional never returns NULL 2016-09-05 21:09:38 +01:00
ad7291.c
ad7298.c
ad7476.c
ad7791.c
ad7793.c
ad7887.c
ad7923.c
ad_sigma_delta.c
at91-sama5d2_adc.c
at91_adc.c Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
axp288_adc.c
bcm_iproc_adc.c
berlin2-adc.c
cc10001_adc.c
da9150-gpadc.c
exynos_adc.c
fsl-imx25-gcq.c
hi8435.c
imx7d_adc.c
ina2xx-adc.c iio: adc: ina2xx: remove unused debug field from chip global data 2016-09-03 16:00:51 +01:00
Kconfig Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
lp8788_adc.c
lpc18xx_adc.c
ltc2485.c iio: adc: ltc2485: add support for Linear Technology LTC2485 ADC 2016-08-29 16:57:40 +01:00
Makefile iio: stx104: Add IIO support for the ADC channels 2016-09-03 17:25:53 +01:00
max1027.c
max1363.c
mcp320x.c
mcp3422.c
men_z188_adc.c iio: adc: men_z188_adc: constify iio_info structures 2016-09-18 11:58:31 +01:00
mt6577_auxadc.c iio: adc: mt2701: Add Mediatek auxadc driver for mt2701. 2016-08-21 19:54:30 +01:00
mxs-lradc.c
nau7802.c iio: adc: Use complete() instead of complete_all() 2016-08-15 18:01:27 +01:00
palmas_gpadc.c
qcom-spmi-iadc.c
qcom-spmi-vadc.c
rockchip_saradc.c iio: adc: rockchip_saradc: reset saradc controller before programming it 2016-08-23 19:05:03 +01:00
stx104.c Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
ti-adc081c.c
ti-adc128s052.c
ti-adc161s626.c iio: adc: ti-adc161s626: add support for TI 1-channel differential ADCs 2016-08-21 11:50:59 +01:00
ti-adc0832.c
ti-adc12138.c iio: adc: add ADC12130/ADC12132/ADC12138 ADC driver 2016-08-31 18:10:36 +01:00
ti-ads1015.c Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
ti-ads8688.c iio: devm_regulator_get_optional never returns NULL 2016-09-05 21:09:38 +01:00
ti_am335x_adc.c iio: adc: ti_am335x_adc: Increase timeout value waiting for ADC sample 2016-08-21 19:48:31 +01:00
twl4030-madc.c
twl6030-gpadc.c
vf610_adc.c
viperboard_adc.c
xilinx-xadc-core.c
xilinx-xadc-events.c
xilinx-xadc.h