1
linux/drivers/hid
Márton Németh d67dec5b2c HID: make USB device id constant
The id_table field of the struct usb_device_id is constant in <linux/usb.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: Jiri Kosina <jkosina@suse.cz>
2010-01-12 14:34:43 +01:00
..
usbhid HID: make USB device id constant 2010-01-12 14:34:43 +01:00
hid-3m-pct.c HID: Support for 3M multitouch panel 2009-12-23 01:28:37 +01:00
hid-a4tech.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-apple.c HID: allow disabling hard-coded ISO-layout for Apple keyboards 2010-01-06 11:21:37 +01:00
hid-belkin.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-cherry.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-chicony.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-core.c HID: fix parsing of local delimiter with size 0 2010-01-05 11:45:52 +01:00
hid-cypress.c HID: add support for Acan FG-8100 barcode reader 2009-12-02 22:54:11 +01:00
hid-debug.c Merge branches 'upstream', 'upstream-fixes' and 'debugfs' into for-linus 2009-09-13 20:09:41 +02:00
hid-drff.c HID: fix hid-ff drivers so that devices work even without ff support 2009-05-15 15:51:36 +02:00
hid-ezkey.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-gaff.c HID: fix hid-ff drivers so that devices work even without ff support 2009-05-15 15:51:36 +02:00
hid-gyration.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-ids.h HID: add support for Stantum multitouch panel 2010-01-04 12:04:08 +01:00
hid-input.c HID: handle joysticks with large number of buttons 2010-01-04 12:20:56 +01:00
hid-kensington.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-kye.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-lg2ff.c HID: convert to dev_* prints 2008-10-14 23:51:01 +02:00
hid-lg.c Merge branches 'bkl-removal', 'upstream' and 'upstream-fixes' into for-linus 2009-12-07 18:30:49 +01:00
hid-lg.h HID: move logitech FF processing 2008-10-14 23:50:56 +02:00
hid-lgff.c HID: Drop NULL test on list_entry result 2009-07-23 01:28:02 +02:00
hid-microsoft.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-monterey.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-ntrig.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-petalynx.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-pl.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-samsung.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-sjoy.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-sony.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-stantum.c HID: add support for Stantum multitouch panel 2010-01-04 12:04:08 +01:00
hid-sunplus.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-tmff.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-topseed.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-twinhan.c HID: add __init/__exit macros to twinhan.c 2009-09-29 13:58:20 +02:00
hid-wacom.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-zpff.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hidraw.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2009-10-13 10:10:33 -07:00
Kconfig HID: make Stantum driver standalone config option 2010-01-04 12:04:59 +01:00
Makefile HID: add support for Stantum multitouch panel 2010-01-04 12:04:08 +01:00