All pastes #1666682 Raw Edit

Anonymous

public diff v1 · immutable
#1666682 ·published 2009-11-11 17:04 UTC
rendered paste body
--- a/driver_src/smartcam.c	2009-07-08 18:28:55.000000000 +0200+++ b/driver_src/smartcam.c	2009-11-04 23:22:36.313389888 +0200@@ -242,11 +242,7 @@ 		SCAM_MSG("vidioc_querybuf called - invalid buf type\n"); 		return -EINVAL; 	}-	if(vidbuf->memory != V4L2_MEMORY_MMAP)-	{-		SCAM_MSG("vidioc_querybuf called - invalid memory type\n");-		return -EINVAL;-	}+	vidbuf->memory = V4L2_MEMORY_MMAP; 	vidbuf->length = SMARTCAM_BUFFER_SIZE; 	vidbuf->bytesused = formats[format].sizeimage; 	vidbuf->flags = V4L2_BUF_FLAG_MAPPED;@@ -538,7 +534,7 @@ { 	int mask = (POLLOUT | POLLWRNORM);	/* writable */ 	if (last_read_frame != frame_sequence)-	    mask |= (POLLIN | POLLRDNORM)	/* readable */+	    mask |= (POLLIN | POLLRDNORM);	/* readable */  	SCAM_MSG("(%s) %s called\n", current->comm, __FUNCTION__); @@ -553,7 +549,7 @@ 	return 0; } -static const struct file_operations smartcam_fops = {+static const struct v4l2_file_operations smartcam_fops = { 	.owner		= THIS_MODULE, 	.open           = smartcam_open, 	.release        = smartcam_release,@@ -562,7 +558,6 @@ 	.poll		= smartcam_poll, 	.ioctl          = video_ioctl2, /* V4L2 ioctl handler */ 	.mmap		= smartcam_mmap,-	.llseek         = no_llseek, };  static const struct v4l2_ioctl_ops smartcam_ioctl_ops = {@@ -594,6 +589,7 @@ #endif }; +#define VID_TYPE_CAPTURE        1 static struct video_device smartcam_vid = { 	.name		= "smartcam", 	.vfl_type		= VID_TYPE_CAPTURE,