linux/drivers
Németh Márton 9052127f63 USB image: 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
..
accessibility
acpi Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2010-03-01 10:36:22 -08:00
amba
ata Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2010-03-01 13:04:58 -08:00
atm
auxdisplay
base PM: Allow device drivers to use dpm_wait() 2010-02-26 20:39:11 +01:00
block Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block 2010-03-01 09:00:29 -08:00
bluetooth
cdrom
char Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-03-01 10:38:09 -08:00
clocksource Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-01 08:48:25 -08:00
connector
cpufreq
cpuidle
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2010-02-26 16:50:02 -08:00
dca
dio
dma
edac
eisa
firewire
firmware drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4 2010-02-26 21:02:14 +00:00
gpio
gpu Merge branch 'x86-pci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 10:59:18 -08:00
hid
hwmon
i2c Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
ide Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2010-03-01 10:36:22 -08:00
idle
ieee1394
ieee802154
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-03-01 10:38:09 -08:00
isdn
leds
lguest
macintosh Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-03-01 10:38:09 -08:00
mca
md
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2010-02-26 17:16:20 -08:00
memstick
message Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block 2010-03-01 09:00:29 -08:00
mfd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-03-01 08:58:44 -08:00
misc
mmc Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
mtd MIPS: Alchemy: physmap-flash for all devboards 2010-02-27 12:52:59 +01:00
net Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci 2010-03-01 13:05:40 -08:00
nubus
of
oprofile
parisc
parport
pci Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2010-03-01 10:36:22 -08:00
pcmcia Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2010-02-27 16:19:22 -08:00
platform Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2010-03-01 10:36:22 -08:00
pnp
power
pps
ps3
rapidio
regulator
rtc Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
s390 Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block 2010-03-01 09:00:29 -08:00
sbus
scsi Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block 2010-03-01 09:00:29 -08:00
serial Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
sfi
sh
sn
spi Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
ssb
staging USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS 2010-03-02 14:53:36 -08:00
tc
telephony
thermal
uio
usb USB image: make USB device id constant 2010-03-02 14:54:17 -08:00
uwb
video Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2010-02-27 16:22:47 -08:00
virtio virtio: fix out of range array access 2010-02-28 20:39:11 +02:00
vlynq
w1
watchdog Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
xen
zorro
Kconfig
Makefile