aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/usbvision/usbvision-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-05 09:47:36 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-05 10:26:47 -0400
commitb295e5c7d84721f76d1728f2ee4152a8cbb6ddaa (patch)
treedf03be4df400de88b52b280f44a9a9f2dcc5be99 /drivers/media/usb/usbvision/usbvision-video.c
parent6b20cf3c0fbd242a337b15577905785bd95ca529 (diff)
[media] usbvision: cleanup the code
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 <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/usbvision/usbvision-video.c')
-rw-r--r--drivers/media/usb/usbvision/usbvision-video.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index 12b403e78d52..1c6d31f7c1b9 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,
1061 __func__, 1061 __func__,
1062 (unsigned long)count, frame->bytes_read); 1062 (unsigned long)count, frame->bytes_read);
1063 1063
1064 /* For now, forget the frame if it has not been read in one shot. */ 1064#if 1
1065/* if (frame->bytes_read >= frame->scanlength) {*/ /* All data has been read */ 1065 /*
1066 * FIXME:
1067 * For now, forget the frame if it has not been read in one shot.
1068 */
1069 frame->bytes_read = 0;
1070
1071 /* Mark it as available to be used again. */
1072 frame->grabstate = frame_state_unused;
1073#else
1074 if (frame->bytes_read >= frame->scanlength) {
1075 /* All data has been read */
1066 frame->bytes_read = 0; 1076 frame->bytes_read = 0;
1067 1077
1068 /* Mark it as available to be used again. */ 1078 /* Mark it as available to be used again. */
1069 frame->grabstate = frame_state_unused; 1079 frame->grabstate = frame_state_unused;
1070/* } */ 1080 }
1081#endif
1071 1082
1072 return count; 1083 return count;
1073} 1084}