The patch number 10357 was added via Jean-Francois Moine <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Jean-Francois Moine  <[email protected]>
gspca - main: Cleanup code.


Priority: normal

Signed-off-by: Jean-Francois Moine <[email protected]>


---

 linux/drivers/media/video/gspca/gspca.c |   20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff -r 5aff83a436d7 -r d75b401fc7cd linux/drivers/media/video/gspca/gspca.c
--- a/linux/drivers/media/video/gspca/gspca.c   Tue Jan 13 09:55:40 2009 +0100
+++ b/linux/drivers/media/video/gspca/gspca.c   Tue Jan 13 10:07:59 2009 +0100
@@ -49,8 +49,6 @@ MODULE_LICENSE("GPL");
 
 #define DRIVER_VERSION_NUMBER  KERNEL_VERSION(2, 5, 0)
 
-static int video_nr = -1;
-
 #ifdef GSPCA_DEBUG
 int gspca_debug = D_ERR | D_PROBE;
 EXPORT_SYMBOL(gspca_debug);
@@ -129,7 +127,7 @@ static void fill_frame(struct gspca_dev 
                        struct urb *urb)
 {
        struct gspca_frame *frame;
-       __u8 *data;             /* address of data in the iso message */
+       u8 *data;               /* address of data in the iso message */
        int i, len, st;
        cam_pkt_op pkt_scan;
 
@@ -169,7 +167,7 @@ static void fill_frame(struct gspca_dev 
                /* let the packet be analyzed by the subdriver */
                PDEBUG(D_PACK, "packet [%d] o:%d l:%d",
                        i, urb->iso_frame_desc[i].offset, len);
-               data = (__u8 *) urb->transfer_buffer
+               data = (u8 *) urb->transfer_buffer
                                        + urb->iso_frame_desc[i].offset;
                pkt_scan(gspca_dev, frame, data, len);
        }
@@ -185,11 +183,11 @@ static void fill_frame(struct gspca_dev 
  *
  * Analyse each packet and call the subdriver for copy to the frame buffer.
  */
-static void isoc_irq(struct urb *urb
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
-                       , struct pt_regs *regs
+static void isoc_irq(struct urb *urb, struct pt_regs *regs)
+#else
+static void isoc_irq(struct urb *urb)
 #endif
-)
 {
        struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
 
@@ -202,11 +200,11 @@ static void isoc_irq(struct urb *urb
 /*
  * bulk message interrupt from the USB device
  */
-static void bulk_irq(struct urb *urb
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
-                       , struct pt_regs *regs
+static void bulk_irq(struct urb *urb, struct pt_regs *regs)
+#else
+static void bulk_irq(struct urb *urb)
 #endif
-)
 {
        struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
        struct gspca_frame *frame;
@@ -1923,7 +1921,7 @@ int gspca_dev_probe(struct usb_interface
        gspca_dev->present = 1;
        ret = video_register_device(&gspca_dev->vdev,
                                  VFL_TYPE_GRABBER,
-                                 video_nr);
+                                 -1);
        if (ret < 0) {
                err("video_register_device err %d", ret);
                goto out;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/d75b401fc7cd229ad96bd63b098439b4dd7dd6a8

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to