Commit 4c7dea97 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] tea575 fix

Very confused ioctl in tea575x - it is called via video_usercopy(), but
assumes that it still has userland pointers.  Fixed.
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b4f428ee
...@@ -85,11 +85,12 @@ static void snd_tea575x_set_freq(tea575x_t *tea) ...@@ -85,11 +85,12 @@ static void snd_tea575x_set_freq(tea575x_t *tea)
* Linux Video interface * Linux Video interface
*/ */
static int snd_tea575x_do_ioctl(struct inode *inode, struct file *file, static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg) unsigned int cmd, unsigned long data)
{ {
struct video_device *dev = video_devdata(file); struct video_device *dev = video_devdata(file);
tea575x_t *tea = video_get_drvdata(dev); tea575x_t *tea = video_get_drvdata(dev);
void __user *arg = (void __user *)data;
switch(cmd) { switch(cmd) {
case VIDIOCGCAP: case VIDIOCGCAP:
...@@ -167,12 +168,6 @@ static int snd_tea575x_do_ioctl(struct inode *inode, struct file *file, ...@@ -167,12 +168,6 @@ static int snd_tea575x_do_ioctl(struct inode *inode, struct file *file,
} }
} }
static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, snd_tea575x_do_ioctl);
}
/* /*
* initialize all the tea575x chips * initialize all the tea575x chips
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment