2 > #include <linux/sched.h>
4 < //#define SMARTCAM_DEBUG
6 > #define SMARTCAM_DEBUG
8 < printk(KERN_ALERT "smartcam (%s): vidioc_s_fmt_cap called\n\t\twidth=%d; \
10 > printk(KERN_ALERT "smartcam : vidioc_s_fmt_cap called\n\t\twidth=%d; \
12 < current->comm, f->fmt.pix.width, f->fmt.pix.height, (char*)&f->fmt.pix.pixelformat,
14 > /*current->comm,*/ f->fmt.pix.width, f->fmt.pix.height, (char*)&f->fmt.pix.pixelformat,
16 > SCAM_MSG("Bad memory type for v4l2_requestbuffers\n");
18 > vidbuf->memory = V4L2_MEMORY_MMAP;
21 < SCAM_MSG("vidioc_querybuf called - invalid memory type\n");
23 > SCAM_MSG("vidioc_querybuf called - invalid memory type(%d!=%d)\n", V4L2_MEMORY_MMAP, vidbuf->memory);
25 < static int smartcam_open(struct inode *inode, struct file *file)
27 > static int smartcam_open(/*struct inode *inode,*/ struct file *file)
30 < minor = iminor(inode);
31 < SCAM_MSG("(%s) %s called (minor=%d)\n", current->comm, __FUNCTION__, minor);
34 > //minor = iminor(inode);
35 > //SCAM_MSG("(%s) %s called (minor=%d)\n", current->comm, __FUNCTION__, minor);
36 > SCAM_MSG("(%s) %s called\n", current->comm, __FUNCTION__);
38 < SCAM_MSG("(%s) %s called (count=%d, f_pos = %d)\n", current->comm, __FUNCTION__, count, (int) *f_pos);
40 > SCAM_MSG("(%s) %s called (count=%d, f_pos = %d)\n", current->comm, __FUNCTION__, (int) count, (int) *f_pos);
42 < SCAM_MSG("(%s) %s called (count=%d, f_pos = %d)\n", current->comm, __FUNCTION__, count, (int) *f_pos);
44 > SCAM_MSG("(%s) %s called (count=%d, f_pos = %d)\n", current->comm, __FUNCTION__, (int) count, (int) *f_pos);
46 < mask |= (POLLIN | POLLRDNORM) /* readable */
48 > mask |= (POLLIN | POLLRDNORM); /* readable */
50 < static int smartcam_release(struct inode *inode, struct file *file)
52 > static int smartcam_release(/*struct inode *inode,*/ struct file *file)
54 < static const struct file_operations smartcam_fops = {
56 > static const struct v4l2_file_operations smartcam_fops = {
58 < .llseek = no_llseek,
60 > /*.llseek = no_llseek,*/
62 < .vfl_type = VID_TYPE_CAPTURE,
64 > .vfl_type = VFL_TYPE_GRABBER,