diff -Naur vloopback-1.2/vloopback.c vloopback-1.3/vloopback.c --- vloopback-1.2/vloopback.c 2009-01-20 13:27:50.000000000 +0100 +++ vloopback-1.3/vloopback.c 2009-05-17 17:17:35.000000000 +0200 @@ -376,7 +376,11 @@ return 0; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) static int vloopback_open(struct inode *inod, struct file *f) +#else +static int vloopback_open(struct file *f) +#endif { struct video_device *loopdev = video_devdata(f); priv_ptr ptr = (priv_ptr)loopdev->vd_private_data; @@ -430,7 +434,11 @@ return 0; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) static int vloopback_release(struct inode * inod, struct file *f) +#else +static int vloopback_release(struct file *f) +#endif { struct video_device *loopdev = video_devdata(f); priv_ptr ptr = (priv_ptr)loopdev->vd_private_data; @@ -691,8 +699,12 @@ return 0; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) static int vloopback_ioctl(struct inode *inod, struct file *f, unsigned int cmd, unsigned long arg) +#else +static long vloopback_ioctl(struct file *f, unsigned int cmd, unsigned long arg) +#endif { struct video_device *loopdev = video_devdata(f); priv_ptr ptr = (priv_ptr)loopdev->vd_private_data; @@ -1115,7 +1127,11 @@ return 0; } -static struct file_operations fileops_template = +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) +static const struct file_operations fileops_template = +#else +static const struct v4l2_file_operations fileops_template = +#endif { owner: THIS_MODULE, open: vloopback_open, @@ -1124,7 +1140,7 @@ write: vloopback_write, poll: vloopback_poll, ioctl: vloopback_ioctl, -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) compat_ioctl: v4l_compat_ioctl32, #endif mmap: vloopback_mmap, @@ -1157,7 +1173,6 @@ minor_in = 2 * nr + dev_offset; minor_out = 2 * nr + 1 + dev_offset; } - /* allocate space for this pipe */ loops[nr]= kmalloc(sizeof(struct vloopback_pipe), GFP_KERNEL); @@ -1334,10 +1349,10 @@ ret = create_pipe(i); if (ret == 0) { - info("Loopback %d registered, input: video%d," - " output: video%d", - i, loops[i]->vloopin->minor, - loops[i]->vloopout->minor); + info("Loopback %d registered, input: /dev/video%d minor %d," + " output: /dev/video%d minor %d", + i, loops[i]->vloopin->num, loops[i]->vloopin->minor, + loops[i]->vloopout->num, loops[i]->vloopout->minor); info("Loopback %d , Using %d buffers", i, num_buffers); nr_o_pipes = i + 1; } else {