Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

smartcam.patch

a guest Dec 3rd, 2010 329 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. --- a/driver_src/smartcam.c     2009-07-08 18:28:55.000000000 +0200
  2. +++ b/driver_src/smartcam.c     2009-11-04 23:22:36.313389888 +0200
  3. @@ -242,11 +242,7 @@
  4.                 SCAM_MSG("vidioc_querybuf called - invalid buf type\n");
  5.                 return -EINVAL;
  6.         }
  7. -       if(vidbuf->memory != V4L2_MEMORY_MMAP)
  8. -       {
  9. -               SCAM_MSG("vidioc_querybuf called - invalid memory type\n");
  10. -               return -EINVAL;
  11. -       }
  12. +       vidbuf->memory = V4L2_MEMORY_MMAP;
  13.         vidbuf->length = SMARTCAM_BUFFER_SIZE;
  14.         vidbuf->bytesused = formats[format].sizeimage;
  15.         vidbuf->flags = V4L2_BUF_FLAG_MAPPED;
  16. @@ -538,7 +534,7 @@
  17.  {
  18.         int mask = (POLLOUT | POLLWRNORM);      /* writable */
  19.         if (last_read_frame != frame_sequence)
  20. -           mask |= (POLLIN | POLLRDNORM)       /* readable */
  21. +           mask |= (POLLIN | POLLRDNORM);      /* readable */
  22.  
  23.         SCAM_MSG("(%s) %s called\n", current->comm, __FUNCTION__);
  24.  
  25. @@ -553,7 +549,7 @@
  26.         return 0;
  27.  }
  28.  
  29. -static const struct file_operations smartcam_fops = {
  30. +static const struct v4l2_file_operations smartcam_fops = {
  31.         .owner          = THIS_MODULE,
  32.         .open           = smartcam_open,
  33.         .release        = smartcam_release,
  34. @@ -562,7 +558,6 @@
  35.         .poll           = smartcam_poll,
  36.         .ioctl          = video_ioctl2, /* V4L2 ioctl handler */
  37.         .mmap           = smartcam_mmap,
  38. -       .llseek         = no_llseek,
  39.  };
  40.  
  41.  static const struct v4l2_ioctl_ops smartcam_ioctl_ops = {
  42. @@ -594,6 +589,7 @@
  43.  #endif
  44.  };
  45.  
  46. +#define VID_TYPE_CAPTURE        1
  47.  static struct video_device smartcam_vid = {
  48.         .name           = "smartcam",
  49.         .vfl_type               = VID_TYPE_CAPTURE,
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top