Skip to contentSkip to conversation

: usbvision: Remove dead code

PATCH New Souptick Joarder 1 participant 1 message Aug 25, 2019 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : usbvision: Remove dead code

These codes are commented since v4.2-rc1. If there is no plan to enable the #else part in future, these can be removed forever.

---
 drivers/media/usb/usbvision/usbvision-video.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/media/usb/usbvision/usbvision-video.c +0 -10
index 93750af..896837f 100644
@@ -967,7 +967,6 @@ static ssize_t usbvision_read(struct file *file, char __user *buf,
 	       __func__,
 	       (unsigned long)count, frame->bytes_read);
 
-#if 1
 	/*
 	 * FIXME:
 	 * For now, forget the frame if it has not been read in one shot.
@@ -976,15 +975,6 @@ static ssize_t usbvision_read(struct file *file, char __user *buf,
 
 	/* 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;
 }
Signature · 1 line
1.9.1