kernel_optimize_test/drivers/spi
Márton Németh 631e61b7ca spi: make Open Firmware device id constant
The match_table field of the struct of_device_id is constant
in <linux/of_platform.h> so it is worth to make the initialization
data constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20 13:49:44 -07:00
..
amba-pl022.c ARM: 5741/1: pl022: fix peripheral id for ST vendor 2009-10-05 17:55:55 +01:00
atmel_spi.c spi: atmel_spi.c: use resource_size() 2009-12-17 08:59:06 -07:00
atmel_spi.h
au1550_spi.c spi/au1550_spi: fix setupxfer not to override cfg with zeros 2009-12-08 18:48:16 -07:00
davinci_spi.c spi: Add SPI master driver for DaVinci/DA8xx 2010-01-20 13:49:34 -07:00
dw_spi_pci.c spi: controller driver for Designware SPI core 2009-12-17 08:39:13 -07:00
dw_spi.c spi: controller driver for Designware SPI core 2009-12-17 08:39:13 -07:00
Kconfig spi: Add SPI master driver for DaVinci/DA8xx 2010-01-20 13:49:34 -07:00
Makefile spi: Add SPI master driver for DaVinci/DA8xx 2010-01-20 13:49:34 -07:00
mpc52xx_psc_spi.c spi: make Open Firmware device id constant 2010-01-20 13:49:44 -07:00
mpc52xx_spi.c spi: make Open Firmware device id constant 2010-01-20 13:49:44 -07:00
omap2_mcspi.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
omap_spi_100k.c Add OMAP spi100k driver 2009-12-13 01:02:11 -07:00
omap_uwire.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
orion_spi.c
pxa2xx_spi.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
spi_bfin5xx.c spi: spi_bfin5xx.c: use resource_size() 2009-12-17 08:59:50 -07:00
spi_bitbang.c
spi_butterfly.c
spi_gpio.c
spi_imx.c spi: fix probe/remove section markings 2009-12-13 01:03:12 -07:00
spi_lm70llp.c
spi_mpc8xxx.c Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2009-12-17 15:59:05 -08:00
spi_nuc900.c ARM: NUC900: Add spi driver support for nuc900 2009-12-13 00:58:00 -07:00
spi_ppc4xx.c spi: make Open Firmware device id constant 2010-01-20 13:49:44 -07:00
spi_s3c24xx_fiq.h spi_s3c24xx: add FIQ pseudo-DMA support 2009-12-17 08:57:01 -07:00
spi_s3c24xx_fiq.S spi_s3c24xx: add FIQ pseudo-DMA support 2009-12-17 08:57:01 -07:00
spi_s3c24xx_gpio.c
spi_s3c24xx.c Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2009-12-17 15:59:05 -08:00
spi_s3c64xx.c spi: Add s3c64xx SPI Controller driver 2009-12-17 08:58:17 -07:00
spi_sh_msiof.c spi: SuperH MSIOF SPI Master driver V2 2009-12-13 00:48:27 -07:00
spi_sh_sci.c spi: spi_sh_sci.c: use resource_size() 2009-12-17 09:00:10 -07:00
spi_stmp.c spi: Fix reversed args to time_before() in Freescale stmp driver. 2010-01-20 13:49:44 -07:00
spi_txx9.c Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2009-12-17 15:59:05 -08:00
spi.c
spidev.c Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2009-12-17 15:59:05 -08:00
tle62x0.c
xilinx_spi_of.c spi: make Open Firmware device id constant 2010-01-20 13:49:44 -07:00
xilinx_spi_pltfm.c xilinx_spi: add a platform driver using the xilinx_spi common module. 2009-12-08 18:48:14 -07:00
xilinx_spi.c spi/xilinx_spi: fix incorrect casting 2009-12-08 18:48:15 -07:00
xilinx_spi.h xilinx_spi: Split into of driver and generic part. 2009-12-08 18:48:14 -07:00