linux-sg2042/drivers/iio/gyro
Julia Lawall becf05e748 iio: common: ssp_sensors: gyro: 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
   1245        344       0    1589         635
   drivers/iio/gyro/ssp_gyro_sensor.o

and after the change it is:
   text	     data        bss	    dec	    hex	filename
   1397       192          0       1589     635
   drivers/iio/gyro/ssp_gyro_sensor.o

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-18 11:59:51 +01:00
..
Kconfig iio: st_gyro: Add lsm9ds0-gyro support 2016-04-23 22:47:18 +01:00
Makefile iio: bmg160: Add SPI driver 2015-08-31 17:06:11 +01:00
adis16080.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
adis16130.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
adis16136.c First set of new device support, features and cleanups for IIO in the 4.5 cycle 2015-12-01 09:13:29 -08:00
adis16260.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
adxrs450.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
bmg160.h iio: bmg160: Separate i2c and core driver 2015-08-31 17:04:23 +01:00
bmg160_core.c iio: bmg160: add callbacks for the filter frequency 2016-07-03 12:39:55 +01:00
bmg160_i2c.c iio: bmg160: Separate i2c and core driver 2015-08-31 17:04:23 +01:00
bmg160_spi.c iio: bmg160: Add SPI driver 2015-08-31 17:06:11 +01:00
hid-sensor-gyro-3d.c iio: gyro: hid-sensor-gyro-3d: Fix memory leak in probe() 2015-05-17 09:09:49 +01:00
itg3200_buffer.c iio: gyro: itg3200: Fix indio_dev->trig assignment 2014-08-25 21:49:00 +01:00
itg3200_core.c iio: Drop owner assignment from i2c_driver 2015-07-11 18:50:07 +01:00
ssp_gyro_sensor.c iio: common: ssp_sensors: gyro: constify iio_info structures 2016-09-18 11:59:51 +01:00
st_gyro.h iio: st_gyro: Add lsm9ds0-gyro support 2016-04-23 22:47:18 +01:00
st_gyro_buffer.c iio: st_sensors: switch to a threaded interrupt 2016-05-29 20:21:41 +01:00
st_gyro_core.c Merge 4.7-rc4 into staging-next 2016-06-20 08:25:44 -07:00
st_gyro_i2c.c iio: st_gyro: Add lsm9ds0-gyro support 2016-04-23 22:47:18 +01:00
st_gyro_spi.c iio: st_gyro: Add lsm9ds0-gyro support 2016-04-23 22:47:18 +01:00