OpenCloudOS-Kernel/drivers/crypto
Márton Németh 6c3f975a4c crypto: Make Open Firmware device id constant
From: Márton Németh <nm127@freemail.hu>

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 also 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: Herbert Xu <herbert@gondor.apana.org.au>
2010-01-17 21:54:01 +11:00
..
amcc crypto: Make Open Firmware device id constant 2010-01-17 21:54:01 +11:00
Kconfig crypto: mv_cesa - Add support for Orion5X crypto engine 2009-08-10 12:50:03 +10:00
Makefile crypto: mv_cesa - Add support for Orion5X crypto engine 2009-08-10 12:50:03 +10:00
geode-aes.c crypto: geode-aes - access .cip instead of .blk in cipher mode 2010-01-08 14:19:21 +11:00
geode-aes.h [CRYPTO] geode: do not copy the IV too often 2008-01-11 08:16:26 +11:00
hifn_795x.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
ixp4xx_crypto.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2009-05-17 15:48:05 -07:00
mv_cesa.c crypto: mv_cesa - Add support for Orion5X crypto engine 2009-08-10 12:50:03 +10:00
mv_cesa.h crypto: mv_cesa - Add support for Orion5X crypto engine 2009-08-10 12:50:03 +10:00
padlock-aes.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-12-14 09:58:24 -08:00
padlock-sha.c crypto: padlock-sha - Fix stack alignment 2009-09-21 23:21:53 -07:00
padlock.h [CRYPTO] padlock: Added block cipher versions of CBC/ECB 2006-09-21 11:44:35 +10:00
talitos.c crypto: Make Open Firmware device id constant 2010-01-17 21:54:01 +11:00
talitos.h crypto: talitos - add support for 36 bit addressing 2009-08-13 11:51:51 +10:00