1 diff -Naur a/video_device.c b/video_device.c
2 --- a/video_device.c 2008-11-09 16:54:51.000000000 +0100
3 +++ b/video_device.c 2010-01-12 15:15:52.000000000 +0100
5 /************************************************
6 **************** V4L FUNCTIONS ***************
7 ************************************************/
8 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
9 static int v4l_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) {
12 +static int v4l_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
16 /* Get capabilities */
22 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
23 static int v4l_open(struct inode *inode, struct file *file) {
26 +static int v4l_open(struct file *file) {
30 printk(KERNEL_PREFIX "entering v4l_open()\n");
37 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
38 static int v4l_close(struct inode *inode, struct file *file) {
41 +static int v4l_close(struct file *file) {
45 printk(KERNEL_PREFIX "entering v4l_close()\n");
54 static int v4l_mmap(struct file *file, struct vm_area_struct *vma) {
56 struct page *page = NULL;
61 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
62 static struct file_operations v4l_fops = {
64 +static struct v4l2_file_operations v4l_fops = {
73 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
74 compat_ioctl: v4l_compat_ioctl32,
78 static struct video_device my_device = {
79 name: "Dummy video device",