18 Sep, 2016
1 commit
-
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/)//
@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 = { ... };
//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.oand after the change it is:
text data bss dec hex filename
1397 192 0 1589 635
drivers/iio/gyro/ssp_gyro_sensor.oSigned-off-by: Julia Lawall
Signed-off-by: Jonathan Cameron
30 Jan, 2015
1 commit
-
This patch adds gyroscope iio driver which uses sensorhub as data
provider.Signed-off-by: Karol Wrona
Acked-by: Kyungmin Park
Signed-off-by: Jonathan Cameron