linux/drivers/usb/core
Németh Márton 1e927d96cb USB hub: 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
..
buffer.c USB: pass mem_flags to dma_alloc_coherent 2009-04-23 14:15:28 -07:00
config.c USB: Fix SS endpoint companion descriptor parsing. 2009-09-23 06:46:18 -07:00
devices.c USB: Don't use GFP_KERNEL while we cannot reset a storage device 2010-01-20 15:24:34 -08:00
devio.c USB: change locking for device-level autosuspend 2010-03-02 14:54:08 -08:00
driver.c USB: convert to the runtime PM framework 2010-03-02 14:54:12 -08:00
endpoint.c PM: Allow USB devices to suspend/resume asynchronously 2010-02-26 20:39:12 +01:00
file.c USB: fix possible null deref in init_usb_class() 2009-12-11 11:55:22 -08:00
generic.c USB: Convert a dev_info to a dev_dbg 2009-12-11 11:55:13 -08:00
hcd-pci.c USB: implement non-tree resume ordering constraints for PCI host controllers 2010-02-26 20:39:12 +01:00
hcd.c USB: convert to the runtime PM framework 2010-03-02 14:54:12 -08:00
hcd.h USB: Move hcd free_dev call into usb_disconnect to fix oops 2010-03-02 14:54:13 -08:00
hub.c USB hub: make USB device id constant 2010-03-02 14:54:17 -08:00
hub.h USB: fix the clear_tt_buffer interface 2009-07-12 15:16:38 -07:00
inode.c const: mark remaining super_operations const 2009-09-22 07:17:24 -07:00
Kconfig USB: convert to the runtime PM framework 2010-03-02 14:54:12 -08:00
Makefile USB: add the usbfs devices file to debugfs 2009-06-15 21:44:43 -07:00
message.c USB: convert to the runtime PM framework 2010-03-02 14:54:12 -08:00
notify.c USB : correct comments in usb/core/notify.c 2008-02-01 14:34:44 -08:00
otg_whitelist.h USB: fix codingstyle issues in drivers/usb/core/*.h 2008-02-01 14:35:07 -08:00
quirks.c USB: change handling of negative autosuspend delays 2010-03-02 14:54:11 -08:00
sysfs.c USB: change handling of negative autosuspend delays 2010-03-02 14:54:11 -08:00
urb.c USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS 2010-03-02 14:53:36 -08:00
usb.c USB: Move hcd free_dev call into usb_disconnect to fix oops 2010-03-02 14:54:13 -08:00
usb.h USB: convert to the runtime PM framework 2010-03-02 14:54:12 -08:00