linux/drivers/reset
Bhumika Goyal 1013258814 reset: constify reset_control_ops structures
Declare reset_control_ops structures as const as they are only stored
in the ops field of a reset_controller_dev structure. This field is of
type const struct reset_control_ops *, so reset_control_ops structures
having this property can be declared as const.
Done using Coccinelle:

@r1 disable optional_qualifier@
identifier i;
position p;
@@
static struct reset_control_ops i@p={...};

@ok1@
identifier r1.i;
position p;
struct ti_syscon_reset_data data;
@@
data.rcdev.ops=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct reset_control_ops i;

File size before: drivers/reset/reset-ti-syscon.o
   text	   data	    bss	    dec	    hex	filename
   1329	    240	      0	   1569	    621	drivers/reset/reset-ti-syscon.o

File size after: drivers/reset/reset-ti-syscon.o
   text	   data	    bss	    dec	    hex	filename
   1377	    192	      0	   1569	    621	drivers/reset/reset-ti-syscon.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2017-01-12 11:12:07 +01:00
..
hisilicon reset: hisilicon: add reset-hi3660 2017-01-09 10:38:58 +01:00
sti reset: sti: Remove STiH415/6 reset support 2016-10-20 11:52:08 +02:00
tegra reset: Add Tegra BPMP reset driver 2016-11-18 14:34:56 +01:00
core.c reset: allow using reset_control_reset with shared reset 2016-11-14 09:58:28 +01:00
Kconfig reset: Add Tegra BPMP reset driver 2016-11-18 14:34:56 +01:00
Makefile reset: Add Tegra BPMP reset driver 2016-11-18 14:34:56 +01:00
reset-ath79.c reset: ath79: add missing include 2016-08-25 13:27:23 +02:00
reset-berlin.c reset: berlin: make it explicitly non-modular 2016-10-24 10:43:40 +02:00
reset-lpc18xx.c reset: lpc18xx: make it explicitly non-modular 2016-10-24 10:45:38 +02:00
reset-meson.c reset: Add support for the Amlogic Meson SoC Reset Controller 2016-06-01 08:21:10 +02:00
reset-oxnas.c reset: oxnas: Add OX820 support 2016-10-20 11:54:55 +02:00
reset-pistachio.c reset: pistachio: use devm_reset_controller_register() 2016-05-30 09:37:47 +02:00
reset-socfpga.c reset: socfpga: make it explicitly non-modular 2016-10-24 10:45:27 +02:00
reset-stm32.c drivers: reset: Add STM32 reset driver 2016-08-24 15:21:28 +02:00
reset-sunxi.c reset: sunxi: make it explicitly non-modular 2016-10-24 10:45:31 +02:00
reset-ti-syscon.c reset: constify reset_control_ops structures 2017-01-12 11:12:07 +01:00
reset-uniphier.c reset: uniphier: rename MIO reset to SD reset for Pro5, PXs2, LD20 SoCs 2016-10-22 18:31:42 +09:00
reset-zynq.c reset: zynq: make it explicitly non-modular 2016-10-24 10:45:32 +02:00