]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/pwc/pwc-if.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6-omap-h63xx.git] / drivers / media / video / pwc / pwc-if.c
index f991d72fe10808d29263e7c0cb6411e9f93bc0b1..423fa7c2d0c9b465fa54f0a6cb761ea06e1cd420 100644 (file)
@@ -130,8 +130,8 @@ static int default_fbufs = 3;   /* Default number of frame buffers */
 #ifdef CONFIG_USB_PWC_DEBUG
        int pwc_trace = PWC_DEBUG_LEVEL;
 #endif
-static int power_save = 0;
-static int led_on = 100, led_off = 0; /* defaults to LED that is on while in use */
+static int power_save;
+static int led_on = 100, led_off; /* defaults to LED that is on while in use */
 static int pwc_preferred_compression = 1; /* 0..3 = uncompressed..high */
 static struct {
        int type;
@@ -159,7 +159,9 @@ static const struct file_operations pwc_fops = {
        .poll =         pwc_video_poll,
        .mmap =         pwc_video_mmap,
        .ioctl =        pwc_video_ioctl,
+#ifdef CONFIG_COMPAT
        .compat_ioctl = v4l_compat_ioctl32,
+#endif
        .llseek =       no_llseek,
 };
 static struct video_device pwc_template = {
@@ -487,7 +489,7 @@ static void pwc_reset_buffers(struct pwc_device *pdev)
        int i;
        unsigned long flags;
 
-       PWC_DEBUG_MEMORY(">> %s __enter__\n", __FUNCTION__);
+       PWC_DEBUG_MEMORY(">> %s __enter__\n", __func__);
 
        spin_lock_irqsave(&pdev->ptrlock, flags);
        pdev->full_frames = NULL;
@@ -509,7 +511,7 @@ static void pwc_reset_buffers(struct pwc_device *pdev)
        pdev->fill_image = 0;
        spin_unlock_irqrestore(&pdev->ptrlock, flags);
 
-       PWC_DEBUG_MEMORY("<< %s __leaving__\n", __FUNCTION__);
+       PWC_DEBUG_MEMORY("<< %s __leaving__\n", __func__);
 }
 
 
@@ -786,8 +788,8 @@ static void pwc_isoc_handler(struct urb *urb)
                } /* ..status == 0 */
                else {
                        /* This is normally not interesting to the user, unless
-                        * you are really debugging something */
-                       static int iso_error = 0;
+                        * you are really debugging something, default = 0 */
+                       static int iso_error;
                        iso_error++;
                        if (iso_error < 20)
                                PWC_DEBUG_FLOW("Iso frame %d of USB has error %d\n", i, fst);
@@ -915,7 +917,7 @@ static void pwc_iso_stop(struct pwc_device *pdev)
                struct urb *urb;
 
                urb = pdev->sbuf[i].urb;
-               if (urb != 0) {
+               if (urb) {
                        PWC_DEBUG_MEMORY("Unlinking URB %p\n", urb);
                        usb_kill_urb(urb);
                }
@@ -931,7 +933,7 @@ static void pwc_iso_free(struct pwc_device *pdev)
                struct urb *urb;
 
                urb = pdev->sbuf[i].urb;
-               if (urb != 0) {
+               if (urb) {
                        PWC_DEBUG_MEMORY("Freeing URB\n");
                        usb_free_urb(urb);
                        pdev->sbuf[i].urb = NULL;
@@ -1426,7 +1428,7 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
        unsigned long page, pos = 0;
        int index;
 
-       PWC_DEBUG_MEMORY(">> %s\n", __FUNCTION__);
+       PWC_DEBUG_MEMORY(">> %s\n", __func__);
        pdev = vdev->priv;
        size = vma->vm_end - vma->vm_start;
        start = vma->vm_start;
@@ -1759,8 +1761,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
 
        /* Allocate video_device structure */
        pdev->vdev = video_device_alloc();
-       if (pdev->vdev == 0)
-       {
+       if (!pdev->vdev) {
                PWC_ERROR("Err, cannot allocate video_device struture. Failing probe.");
                kfree(pdev);
                return -ENOMEM;