linux/drivers/usb/misc
Németh Márton 33b9e16243 USB misc: 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: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02 14:54:17 -08:00
..
sisusbvga USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
adutux.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
appledisplay.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
berry_charge.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
cypress_cy7c63.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
cytherm.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
emi26.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
emi62.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
ftdi-elan.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
idmouse.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
iowarrior.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
isight_firmware.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
Kconfig USB: usbtest: no need for USB_DEVICEFS 2009-07-28 14:31:11 -07:00
ldusb.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
legousbtower.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
Makefile USB: remove phidget drivers from kernel tree. 2009-03-24 16:20:37 -07:00
rio500_usb.h
rio500.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
trancevibrator.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
usb_u132.h Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6 2006-12-01 16:41:58 -08:00
usblcd.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
usbled.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
usbsevseg.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
usbtest.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
uss720.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00
vstusb.c USB misc: make USB device id constant 2010-03-02 14:54:17 -08:00