diff options
Diffstat (limited to 'drivers/media/usb/usbvision/usbvision-video.c')
| -rw-r--r-- | drivers/media/usb/usbvision/usbvision-video.c | 17 |
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 | } |
