* [PATCH] gspca: make device_table[]s constant
@ 2009-12-06 16:51 Németh Márton
0 siblings, 0 replies; only message in thread
From: Németh Márton @ 2009-12-06 16:51 UTC (permalink / raw)
To: Jean-Francois Moine, V4L Mailing List
From: Márton Németh <nm127@freemail.hu>
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 <nm127@freemail.hu>
---
diff -r e16961fe157d linux/drivers/media/video/gspca/conex.c
--- a/linux/drivers/media/video/gspca/conex.c Wed Dec 02 18:39:53 2009 +0100
+++ b/linux/drivers/media/video/gspca/conex.c Sun Dec 06 17:45:02 2009 +0100
@@ -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),
diff -r e16961fe157d linux/drivers/media/video/gspca/etoms.c
--- a/linux/drivers/media/video/gspca/etoms.c Wed Dec 02 18:39:53 2009 +0100
+++ b/linux/drivers/media/video/gspca/etoms.c Sun Dec 06 17:45:02 2009 +0100
@@ -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),
diff -r e16961fe157d linux/drivers/media/video/gspca/pac7302.c
--- a/linux/drivers/media/video/gspca/pac7302.c Wed Dec 02 18:39:53 2009 +0100
+++ b/linux/drivers/media/video/gspca/pac7302.c Sun Dec 06 17:45:02 2009 +0100
@@ -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),
diff -r e16961fe157d linux/drivers/media/video/gspca/pac7311.c
--- a/linux/drivers/media/video/gspca/pac7311.c Wed Dec 02 18:39:53 2009 +0100
+++ b/linux/drivers/media/video/gspca/pac7311.c Sun Dec 06 17:45:03 2009 +0100
@@ -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),
diff -r e16961fe157d linux/drivers/media/video/gspca/sonixb.c
--- a/linux/drivers/media/video/gspca/sonixb.c Wed Dec 02 18:39:53 2009 +0100
+++ b/linux/drivers/media/video/gspca/sonixb.c Sun Dec 06 17:45:03 2009 +0100
@@ -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),
diff -r e16961fe157d linux/drivers/media/video/gspca/spca506.c
--- a/linux/drivers/media/video/gspca/spca506.c Wed Dec 02 18:39:53 2009 +0100
+++ b/linux/drivers/media/video/gspca/spca506.c Sun Dec 06 17:45:03 2009 +0100
@@ -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),
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-06 16:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-06 16:51 [PATCH] gspca: make device_table[]s constant Németh Márton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.