This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/media_tree.git tree:

Subject: [media] usbvision: cleanup the code
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Fri Jun 5 10:47:36 2015 -0300

There's a dead code on usbvision that makes it harder to read
and produces a smatch warning about bad identation.

Improve the code readability and add a FIXME to warn about
the current hack there.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/usb/usbvision/usbvision-video.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=b295e5c7d84721f76d1728f2ee4152a8cbb6ddaa

diff --git a/drivers/media/usb/usbvision/usbvision-video.c 
b/drivers/media/usb/usbvision/usbvision-video.c
index 12b403e..1c6d31f 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -1061,13 +1061,24 @@ static ssize_t usbvision_read(struct file *file, char 
__user *buf,
               __func__,
               (unsigned long)count, frame->bytes_read);
 
-       /* For now, forget the frame if it has not been read in one shot. */
-/*     if (frame->bytes_read >= frame->scanlength) {*/ /* All data has been 
read */
+#if 1
+       /*
+        * FIXME:
+        * For now, forget the frame if it has not been read in one shot.
+        */
+       frame->bytes_read = 0;
+
+       /* Mark it as available to be used again. */
+       frame->grabstate = frame_state_unused;
+#else
+       if (frame->bytes_read >= frame->scanlength) {
+               /* All data has been read */
                frame->bytes_read = 0;
 
                /* Mark it as available to be used again. */
                frame->grabstate = frame_state_unused;
-/*     } */
+       }
+#endif
 
        return count;
 }

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

Reply via email to