Commit ee6619db authored by Gerd Knorr's avatar Gerd Knorr Committed by Linus Torvalds

adapt v4l usb cam drivers to 2.4.8-pre1 videodev fixes.

parent cbba4f5e
...@@ -82,7 +82,7 @@ static void *usb_dsbr100_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -82,7 +82,7 @@ static void *usb_dsbr100_probe(struct usb_device *dev, unsigned int ifnum,
const struct usb_device_id *id); const struct usb_device_id *id);
static void usb_dsbr100_disconnect(struct usb_device *dev, void *ptr); static void usb_dsbr100_disconnect(struct usb_device *dev, void *ptr);
static int usb_dsbr100_ioctl(struct inode *inode, struct file *file, static int usb_dsbr100_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg); unsigned int cmd, unsigned long arg);
static int usb_dsbr100_open(struct inode *inode, struct file *file); static int usb_dsbr100_open(struct inode *inode, struct file *file);
static int usb_dsbr100_close(struct inode *inode, struct file *file); static int usb_dsbr100_close(struct inode *inode, struct file *file);
...@@ -103,7 +103,7 @@ static struct file_operations usb_dsbr100_fops = { ...@@ -103,7 +103,7 @@ static struct file_operations usb_dsbr100_fops = {
owner: THIS_MODULE, owner: THIS_MODULE,
open: usb_dsbr100_open, open: usb_dsbr100_open,
release: usb_dsbr100_close, release: usb_dsbr100_close,
ioctl: video_generic_ioctl, ioctl: usb_dsbr100_ioctl,
llseek: no_llseek, llseek: no_llseek,
}; };
static struct video_device usb_dsbr100_radio= static struct video_device usb_dsbr100_radio=
...@@ -113,7 +113,6 @@ static struct video_device usb_dsbr100_radio= ...@@ -113,7 +113,6 @@ static struct video_device usb_dsbr100_radio=
type: VID_TYPE_TUNER, type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_AZTECH, hardware: VID_HARDWARE_AZTECH,
fops: &usb_dsbr100_fops, fops: &usb_dsbr100_fops,
kernel_ioctl: usb_dsbr100_ioctl,
}; };
static int users = 0; static int users = 0;
...@@ -212,8 +211,8 @@ static void usb_dsbr100_disconnect(struct usb_device *dev, void *ptr) ...@@ -212,8 +211,8 @@ static void usb_dsbr100_disconnect(struct usb_device *dev, void *ptr)
unlock_kernel(); unlock_kernel();
} }
static int usb_dsbr100_ioctl(struct inode *inode, struct file *file, static int usb_dsbr100_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg) unsigned int cmd, void *arg)
{ {
struct video_device *dev = video_devdata(file); struct video_device *dev = video_devdata(file);
usb_dsbr100 *radio=dev->priv; usb_dsbr100 *radio=dev->priv;
...@@ -299,6 +298,11 @@ static int usb_dsbr100_ioctl(struct inode *inode, struct file *file, ...@@ -299,6 +298,11 @@ static int usb_dsbr100_ioctl(struct inode *inode, struct file *file,
} }
} }
static int usb_dsbr100_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, usb_dsbr100_do_ioctl);
}
static int usb_dsbr100_open(struct inode *inode, struct file *file) static int usb_dsbr100_open(struct inode *inode, struct file *file)
{ {
......
...@@ -4555,9 +4555,11 @@ ov51x_v4l1_close(struct inode *inode, struct file *file) ...@@ -4555,9 +4555,11 @@ ov51x_v4l1_close(struct inode *inode, struct file *file)
/* Do not call this function directly! */ /* Do not call this function directly! */
static int static int
ov51x_v4l1_ioctl_internal(struct usb_ov511 *ov, unsigned int cmd, ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file,
void *arg) unsigned int cmd, void *arg)
{ {
struct video_device *vdev = file->private_data;
struct usb_ov511 *ov = vdev->priv;
PDEBUG(5, "IOCtl: 0x%X", cmd); PDEBUG(5, "IOCtl: 0x%X", cmd);
if (!ov->dev) if (!ov->dev)
...@@ -5067,7 +5069,7 @@ ov51x_v4l1_ioctl_internal(struct usb_ov511 *ov, unsigned int cmd, ...@@ -5067,7 +5069,7 @@ ov51x_v4l1_ioctl_internal(struct usb_ov511 *ov, unsigned int cmd,
static int static int
ov51x_v4l1_ioctl(struct inode *inode, struct file *file, ov51x_v4l1_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg) unsigned int cmd, unsigned long arg)
{ {
struct video_device *vdev = file->private_data; struct video_device *vdev = file->private_data;
struct usb_ov511 *ov = vdev->priv; struct usb_ov511 *ov = vdev->priv;
...@@ -5076,7 +5078,7 @@ ov51x_v4l1_ioctl(struct inode *inode, struct file *file, ...@@ -5076,7 +5078,7 @@ ov51x_v4l1_ioctl(struct inode *inode, struct file *file,
if (down_interruptible(&ov->lock)) if (down_interruptible(&ov->lock))
return -EINTR; return -EINTR;
rc = ov51x_v4l1_ioctl_internal(ov, cmd, arg); rc = video_usercopy(inode, file, cmd, arg, ov51x_v4l1_ioctl_internal);
up(&ov->lock); up(&ov->lock);
return rc; return rc;
...@@ -5284,7 +5286,7 @@ static struct file_operations ov511_fops = { ...@@ -5284,7 +5286,7 @@ static struct file_operations ov511_fops = {
release: ov51x_v4l1_close, release: ov51x_v4l1_close,
read: ov51x_v4l1_read, read: ov51x_v4l1_read,
mmap: ov51x_v4l1_mmap, mmap: ov51x_v4l1_mmap,
ioctl: video_generic_ioctl, ioctl: ov51x_v4l1_ioctl,
llseek: no_llseek, llseek: no_llseek,
}; };
...@@ -5294,7 +5296,6 @@ static struct video_device vdev_template = { ...@@ -5294,7 +5296,6 @@ static struct video_device vdev_template = {
type: VID_TYPE_CAPTURE, type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_OV511, hardware: VID_HARDWARE_OV511,
fops: &ov511_fops, fops: &ov511_fops,
kernel_ioctl: ov51x_v4l1_ioctl,
}; };
#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS) #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
......
...@@ -126,7 +126,7 @@ static int pwc_video_read(struct file *file, char *buf, ...@@ -126,7 +126,7 @@ static int pwc_video_read(struct file *file, char *buf,
size_t count, loff_t *ppos); size_t count, loff_t *ppos);
static unsigned int pwc_video_poll(struct file *file, poll_table *wait); static unsigned int pwc_video_poll(struct file *file, poll_table *wait);
static int pwc_video_ioctl(struct inode *inode, struct file *file, static int pwc_video_ioctl(struct inode *inode, struct file *file,
unsigned int ioctlnr, void *arg); unsigned int ioctlnr, unsigned long arg);
static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma);
static struct file_operations pwc_fops = { static struct file_operations pwc_fops = {
...@@ -136,7 +136,7 @@ static struct file_operations pwc_fops = { ...@@ -136,7 +136,7 @@ static struct file_operations pwc_fops = {
read: pwc_video_read, read: pwc_video_read,
poll: pwc_video_poll, poll: pwc_video_poll,
mmap: pwc_video_mmap, mmap: pwc_video_mmap,
ioctl: video_generic_ioctl, ioctl: pwc_video_ioctl,
llseek: no_llseek, llseek: no_llseek,
}; };
static struct video_device pwc_template = { static struct video_device pwc_template = {
...@@ -145,7 +145,6 @@ static struct video_device pwc_template = { ...@@ -145,7 +145,6 @@ static struct video_device pwc_template = {
type: VID_TYPE_CAPTURE, type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_PWC, hardware: VID_HARDWARE_PWC,
fops: &pwc_fops, fops: &pwc_fops,
kernel_ioctl: pwc_video_ioctl,
}; };
/***************************************************************************/ /***************************************************************************/
...@@ -1171,8 +1170,8 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait) ...@@ -1171,8 +1170,8 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait)
return 0; return 0;
} }
static int pwc_video_ioctl(struct inode *inode, struct file *file, static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg) unsigned int cmd, void *arg)
{ {
struct video_device *vdev = file->private_data; struct video_device *vdev = file->private_data;
struct pwc_device *pdev; struct pwc_device *pdev;
...@@ -1494,6 +1493,13 @@ static int pwc_video_ioctl(struct inode *inode, struct file *file, ...@@ -1494,6 +1493,13 @@ static int pwc_video_ioctl(struct inode *inode, struct file *file,
return 0; return 0;
} }
static int pwc_video_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, pwc_video_do_ioctl);
}
static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
{ {
struct video_device *vdev = file->private_data; struct video_device *vdev = file->private_data;
......
...@@ -1046,8 +1046,8 @@ static int se401_close(struct inode *inode, struct file *file) ...@@ -1046,8 +1046,8 @@ static int se401_close(struct inode *inode, struct file *file)
return 0; return 0;
} }
static int se401_ioctl(struct inode *inode, struct file *file, static int se401_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg) unsigned int cmd, void *arg)
{ {
struct video_device *vdev = file->private_data; struct video_device *vdev = file->private_data;
struct usb_se401 *se401 = (struct usb_se401 *)vdev; struct usb_se401 *se401 = (struct usb_se401 *)vdev;
...@@ -1210,6 +1210,12 @@ static int se401_ioctl(struct inode *inode, struct file *file, ...@@ -1210,6 +1210,12 @@ static int se401_ioctl(struct inode *inode, struct file *file,
return 0; return 0;
} }
static int se401_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, se401_do_ioctl);
}
static int se401_read(struct file *file, char *buf, static int se401_read(struct file *file, char *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -1294,7 +1300,7 @@ static struct file_operations se401_fops = { ...@@ -1294,7 +1300,7 @@ static struct file_operations se401_fops = {
release: se401_close, release: se401_close,
read: se401_read, read: se401_read,
mmap: se401_mmap, mmap: se401_mmap,
ioctl: video_generic_ioctl, ioctl: se401_ioctl,
llseek: no_llseek, llseek: no_llseek,
}; };
static struct video_device se401_template = { static struct video_device se401_template = {
...@@ -1303,7 +1309,6 @@ static struct video_device se401_template = { ...@@ -1303,7 +1309,6 @@ static struct video_device se401_template = {
type: VID_TYPE_CAPTURE, type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_SE401, hardware: VID_HARDWARE_SE401,
fops: &se401_fops, fops: &se401_fops,
kernel_ioctl: se401_ioctl,
}; };
......
...@@ -1171,8 +1171,8 @@ static int stv_close (struct inode *inode, struct file *file) ...@@ -1171,8 +1171,8 @@ static int stv_close (struct inode *inode, struct file *file)
return 0; return 0;
} }
static int stv680_ioctl (struct inode *inode, struct file *file, static int stv680_do_ioctl (struct inode *inode, struct file *file,
unsigned int cmd, void *arg) unsigned int cmd, void *arg)
{ {
struct video_device *vdev = file->private_data; struct video_device *vdev = file->private_data;
struct usb_stv *stv680 = (struct usb_stv *) vdev; struct usb_stv *stv680 = (struct usb_stv *) vdev;
...@@ -1342,6 +1342,12 @@ static int stv680_ioctl (struct inode *inode, struct file *file, ...@@ -1342,6 +1342,12 @@ static int stv680_ioctl (struct inode *inode, struct file *file,
return 0; return 0;
} }
static int stv680_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, stv680_do_ioctl);
}
static int stv680_mmap (struct file *file, struct vm_area_struct *vma) static int stv680_mmap (struct file *file, struct vm_area_struct *vma)
{ {
struct video_device *dev = file->private_data; struct video_device *dev = file->private_data;
...@@ -1434,7 +1440,7 @@ static struct file_operations stv680_fops = { ...@@ -1434,7 +1440,7 @@ static struct file_operations stv680_fops = {
release: stv_close, release: stv_close,
read: stv680_read, read: stv680_read,
mmap: stv680_mmap, mmap: stv680_mmap,
ioctl: video_generic_ioctl, ioctl: stv680_ioctl,
llseek: no_llseek, llseek: no_llseek,
}; };
static struct video_device stv680_template = { static struct video_device stv680_template = {
...@@ -1443,7 +1449,6 @@ static struct video_device stv680_template = { ...@@ -1443,7 +1449,6 @@ static struct video_device stv680_template = {
type: VID_TYPE_CAPTURE, type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_SE401, hardware: VID_HARDWARE_SE401,
fops: &stv680_fops, fops: &stv680_fops,
kernel_ioctl: stv680_ioctl,
}; };
static void *__devinit stv680_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id) static void *__devinit stv680_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id)
......
...@@ -483,8 +483,8 @@ static int vicam_v4l_read(struct file *file, char *user_buf, ...@@ -483,8 +483,8 @@ static int vicam_v4l_read(struct file *file, char *user_buf,
return buflen; return buflen;
} }
static int vicam_v4l_ioctl(struct inode *inode, struct file *file, static int vicam_v4l_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg) unsigned int cmd, void *arg)
{ {
struct video_device *vdev = file->private_data; struct video_device *vdev = file->private_data;
struct usb_vicam *vicam = (struct usb_vicam *)vdev; struct usb_vicam *vicam = (struct usb_vicam *)vdev;
...@@ -593,6 +593,12 @@ static int vicam_v4l_ioctl(struct inode *inode, struct file *file, ...@@ -593,6 +593,12 @@ static int vicam_v4l_ioctl(struct inode *inode, struct file *file,
return ret; return ret;
} }
static int vicam_v4l_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
return video_usercopy(inode, file, cmd, arg, vicam_v4l_do_ioctl);
}
static int vicam_v4l_mmap(struct file *file, struct vm_area_struct *vma) static int vicam_v4l_mmap(struct file *file, struct vm_area_struct *vma)
{ {
struct video_device *vdev = file->private_data; struct video_device *vdev = file->private_data;
...@@ -639,7 +645,7 @@ static struct file_operations vicam_fops = { ...@@ -639,7 +645,7 @@ static struct file_operations vicam_fops = {
release: vicam_v4l_close, release: vicam_v4l_close,
read: vicam_v4l_read, read: vicam_v4l_read,
mmap: vicam_v4l_mmap, mmap: vicam_v4l_mmap,
ioctl: video_generic_ioctl, ioctl: vicam_v4l_ioctl,
llseek: no_llseek, llseek: no_llseek,
}; };
static struct video_device vicam_template = { static struct video_device vicam_template = {
...@@ -648,7 +654,6 @@ static struct video_device vicam_template = { ...@@ -648,7 +654,6 @@ static struct video_device vicam_template = {
type: VID_TYPE_CAPTURE, type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_SE401, /* need to ask for own id */ hardware: VID_HARDWARE_SE401, /* need to ask for own id */
fops: &vicam_fops, fops: &vicam_fops,
kernel_ioctl: vicam_v4l_ioctl,
}; };
/****************************************************************************** /******************************************************************************
......
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