gspca: make device_table[]s constant
PATCH 1/1 gspca: make device_table[]s constant
From: Márton Németh <[email protected]>
The device_table structure is used as a constant. The driver_info field is only copied to the struct sd so it is also not modified.
Signed-off-by Márton Németh <[email protected]>
---
linux/drivers/media/video/gspca/conex.c +2 -2
@@ -1046,14 +1046,14 @@ };/* -- module initialisation -- */ -static __devinitdata struct usb_device_id device_table[] = { +static const struct usb_device_id device_table[]__devinitconst = { {USB_DEVICE (0x0572 ,0x0041 )}, {} };MODULE_DEVICE_TABLE (usb, device_table);/* -- device connect -- */ -static int sd_probe (struct usb_interface *intf, +static int __devinit sd_probe (struct usb_interface *intf,const struct usb_device_id *id) { return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
linux/drivers/media/video/gspca/etoms.c +2 -2
@@ -870,7 +870,7 @@ };/* -- module initialisation -- */ -static __devinitdata struct usb_device_id device_table[] = { +static const struct usb_device_id device_table[]__devinitconst = { {USB_DEVICE (0x102c ,0x6151 ), .driver_info =SENSOR_PAS106 }, #if !defined CONFIG_USB_ET61X251 && !defined CONFIG_USB_ET61X251_MODULE {USB_DEVICE(0x102c, 0x6251), .driver_info = SENSOR_TAS5130CXX},
@@ -881,7 +881,7 @@MODULE_DEVICE_TABLE (usb, device_table);/* -- device connect -- */ -static int sd_probe (struct usb_interface *intf, +static int __devinit sd_probe (struct usb_interface *intf,const struct usb_device_id *id) { return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
linux/drivers/media/video/gspca/pac7302.c +2 -2
@@ -1250,7 +1250,7 @@ };/* -- module initialisation -- */ -static __devinitdata struct usb_device_id device_table[] = { +static const struct usb_device_id device_table[]__devinitconst = { {USB_DEVICE (0x06f8 ,0x3009 )}, {USB_DEVICE (0x093a ,0x2620 )}, {USB_DEVICE (0x093a ,0x2621 )},
@@ -1266,7 +1266,7 @@MODULE_DEVICE_TABLE (usb, device_table);/* -- device connect -- */ -static int sd_probe (struct usb_interface *intf, +static int __devinit sd_probe (struct usb_interface *intf,const struct usb_device_id *id) { return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
linux/drivers/media/video/gspca/pac7311.c +2 -2
@@ -884,7 +884,7 @@ };/* -- module initialisation -- */ -static __devinitdata struct usb_device_id device_table[] = { +static const struct usb_device_id device_table[]__devinitconst = { {USB_DEVICE (0x093a ,0x2600 )}, {USB_DEVICE (0x093a ,0x2601 )}, {USB_DEVICE (0x093a ,0x2603 )},
@@ -896,7 +896,7 @@MODULE_DEVICE_TABLE (usb, device_table);/* -- device connect -- */ -static int sd_probe (struct usb_interface *intf, +static int __devinit sd_probe (struct usb_interface *intf,const struct usb_device_id *id) { return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
linux/drivers/media/video/gspca/sonixb.c +2 -2
@@ -1256,7 +1256,7 @@ .driver_info = (SENSOR_ ## sensor << 8) | BRIDGE_ ## bridge -static __devinitdata struct usb_device_id device_table[] = { +static const struct usb_device_id device_table[]__devinitconst = { {USB_DEVICE (0x0c45 ,0x6001 ),SB (TAS5110 ,102 )},/* TAS5110C1B */ {USB_DEVICE (0x0c45 ,0x6005 ),SB (TAS5110 ,101 )},/* TAS5110C1B */ #if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE
@@ -1287,7 +1287,7 @@MODULE_DEVICE_TABLE (usb, device_table);/* -- device connect -- */ -static int sd_probe (struct usb_interface *intf, +static int __devinit sd_probe (struct usb_interface *intf,const struct usb_device_id *id) { return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
linux/drivers/media/video/gspca/spca506.c +2 -2
@@ -685,7 +685,7 @@ };/* -- module initialisation -- */ -static __devinitdata struct usb_device_id device_table[] = { +static const struct usb_device_id device_table[]__devinitconst = { {USB_DEVICE (0x06e1 ,0xa190 )},/*fixme: may be IntelPCCameraPro BRIDGE_SPCA505 {USB_DEVICE(0x0733, 0x0430)}, */
@@ -696,7 +696,7 @@MODULE_DEVICE_TABLE (usb, device_table);/* -- device connect -- */ -static int sd_probe (struct usb_interface *intf, +static int __devinit sd_probe (struct usb_interface *intf,const struct usb_device_id *id) { return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),