]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - drivers/media/video/pwc/pwc-if.c
V4L/DVB (7094): static memory
[mirror_ubuntu-kernels.git] / drivers / media / video / pwc / pwc-if.c
index f991d72fe10808d29263e7c0cb6411e9f93bc0b1..b6240a1a606f360fabb1895cb814da9eac07b1f0 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;
@@ -786,8 +786,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 +915,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 +931,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;
@@ -1759,8 +1759,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;