1 --- em28xx-video.c.orig 2009-04-22 15:19:52.775497497 +0200
2 +++ em28xx-video.c 2009-04-22 18:02:38.381164273 +0200
4 * inits the device and starts isoc transfer
7 -static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
8 +static int em28xx_v4l2_open(struct file *filp)
10 - int minor = iminor(inode);
11 + int minor = video_devdata(filp)->minor;
13 int mode = V4L2_TUNER_ANALOG_TV;
16 * stops streaming and deallocates all resources allocated by the
17 * v4l2 calls and ioctls
19 -static int em28xx_v4l2_close(struct inode *inode, struct file *filp)
20 +static int em28xx_v4l2_close(struct file *filp)
26 * will allocate buffers when called for the first time
28 -static unsigned int em28xx_v4l2_poll(struct file *filp, poll_table *wait)
29 +static unsigned int em28xx_v4l2_poll(struct file *filp, struct poll_table_struct *wait)
31 unsigned int mask = 0;
32 struct em28xx_fh *fh = filp->private_data;
34 * em28xx_v4l2_ioctl() via em28xx_video_do_ioctl(). Userspace
35 * copying is done already, arg is a kernel pointer.
37 -static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
38 +static int em28xx_do_ioctl(struct file *filp,
39 struct em28xx *dev, unsigned int cmd, void *arg,
40 v4l2_kioctl driver_ioctl)
43 * em28xx_v4l2_ioctl. Userspace
44 * copying is done already, arg is a kernel pointer.
46 -static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
47 +static int em28xx_video_do_ioctl(struct file *filp,
48 unsigned int cmd, void *arg)
50 struct em28xx_fh *fh = filp->private_data;
52 return em28xx_do_ioctl(inode, filp, dev, cmd, arg,
53 em28xx_video_do_ioctl);
55 - return em28xx_do_ioctl(inode, filp, dev, cmd, arg,
56 + return em28xx_do_ioctl(filp, dev, cmd, arg,
61 * struct v4l2_ioctl_ops. The struct v4l2_ioctl_ops was introduced with commit
62 * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a399810ca69d9d4bd30ab8c1678c7439e567f90b
64 -static int em28xx_v4l2_ioctl_fops(struct inode *inode, struct file *filp,
65 +static int em28xx_v4l2_ioctl_fops(struct file *filp,
66 unsigned int cmd, unsigned long arg)
68 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
73 -static struct file_operations em28xx_v4l_fops = {
74 +static struct v4l2_file_operations em28xx_v4l_fops = {
76 .open = em28xx_v4l2_open,
77 .release = em28xx_v4l2_close,
79 .read = em28xx_v4l2_read,
80 .poll = em28xx_v4l2_poll,
81 .mmap = em28xx_v4l2_mmap,
82 - .llseek = no_llseek,
83 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
85 .compat_ioctl = v4l_compat_ioctl32,