bttv_dma_free(fh->btv,buf);
}
-static int bttv_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg)
+static int bttv_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
{
struct bttv_fh *fh = file->private_data;
struct bttv *btv = fh->btv;
return retval;
}
+static int bttv_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, bttv_do_ioctl);
+}
+
/* start capture to a kernel bounce buffer */
static int bttv_read_capture(struct bttv_fh *fh)
{
owner: THIS_MODULE,
open: bttv_open,
release: bttv_release,
- ioctl: video_generic_ioctl,
+ ioctl: bttv_ioctl,
llseek: no_llseek,
read: bttv_read,
mmap: bttv_mmap,
VID_TYPE_CLIPPING|VID_TYPE_SCALES,
hardware: VID_HARDWARE_BT848,
fops: &bttv_fops,
- kernel_ioctl: bttv_ioctl,
minor: -1,
};
return 0;
}
-static int radio_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg)
+static int radio_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
{
struct bttv *btv = file->private_data;
return 0;
}
+static int radio_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, radio_do_ioctl);
+}
+
static struct file_operations radio_fops =
{
owner: THIS_MODULE,
open: radio_open,
release: radio_release,
- ioctl: video_generic_ioctl,
+ ioctl: radio_ioctl,
llseek: no_llseek,
};
type: VID_TYPE_TUNER|VID_TYPE_TELETEXT,
hardware: VID_HARDWARE_BT848,
fops: &radio_fops,
- kernel_ioctl: radio_ioctl,
minor: -1,
};
return 0;
}
-static int vbi_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg)
+static int vbi_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
{
struct bttv *btv = file->private_data;
#ifdef HAVE_V4L2
#endif
}
+static int vbi_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, vbi_do_ioctl);
+}
+
static ssize_t vbi_read(struct file *file, char *data,
size_t count, loff_t *ppos)
{
owner: THIS_MODULE,
open: vbi_open,
release: vbi_release,
- ioctl: video_generic_ioctl,
+ ioctl: vbi_ioctl,
llseek: no_llseek,
read: vbi_read,
poll: vbi_poll,
type: VID_TYPE_TUNER|VID_TYPE_TELETEXT,
hardware: VID_HARDWARE_BT848,
fops: &vbi_fops,
- kernel_ioctl: vbi_ioctl,
minor: -1,
};
* Video4linux interfacing
*/
-static int qcam_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg)
+static int qcam_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
struct qcam_device *qcam=(struct qcam_device *)dev;
return 0;
}
+static int qcam_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, qcam_do_ioctl);
+}
+
static int qcam_read(struct file *file, char *buf,
size_t count, loff_t *ppos)
{
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
- ioctl: video_generic_ioctl,
+ ioctl: qcam_ioctl,
read: qcam_read,
llseek: no_llseek,
};
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_QCAM_BW,
fops: &qcam_fops,
- kernel_ioctl: qcam_ioctl,
};
#define MAX_CAMS 4
* Video4linux interfacing
*/
-static int qcam_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg)
+static int qcam_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
struct qcam_device *qcam=(struct qcam_device *)dev;
return 0;
}
+static int qcam_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, qcam_do_ioctl);
+}
+
static int qcam_read(struct file *file, char *buf,
size_t count, loff_t *ppos)
{
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
- ioctl: video_generic_ioctl,
+ ioctl: qcam_ioctl,
read: qcam_read,
llseek: no_llseek,
};
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_QCAM_C,
fops: &qcam_fops,
- kernel_ioctl: qcam_ioctl,
};
/* Initialize the QuickCam driver control structure. */
return cam->decompressed_frame.count;
}
-static int cpia_ioctl(struct inode *inode, struct file *file,
- unsigned int ioctlnr, void *arg)
+static int cpia_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int ioctlnr, void *arg)
{
struct video_device *dev = file->private_data;
struct cam_data *cam = dev->priv;
return retval;
}
+static int cpia_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, cpia_do_ioctl);
+}
+
/* FIXME */
static int cpia_mmap(struct file *file, struct vm_area_struct *vma)
{
release: cpia_close,
read: cpia_read,
mmap: cpia_mmap,
- ioctl: video_generic_ioctl,
+ ioctl: cpia_ioctl,
llseek: no_llseek,
};
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_CPIA, /* FIXME */
fops: &cpia_fops,
- kernel_ioctl: cpia_ioctl,
};
/* initialise cam_data structure */
* Video4linux interfacing
*/
-static int pms_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg)
+static int pms_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
struct pms_device *pd=(struct pms_device *)dev;
return 0;
}
+static int pms_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, pms_do_ioctl);
+}
+
static int pms_read(struct file *file, char *buf,
size_t count, loff_t *ppos)
{
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
- ioctl: video_generic_ioctl,
+ ioctl: pms_ioctl,
read: pms_read,
llseek: no_llseek,
};
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_PMS,
fops: &pms_fops,
- kernel_ioctl: pms_ioctl,
};
struct pms_device pms_device;
* Standard character-device-driver functions
*/
-static int do_saa5249_ioctl(struct saa5249_device *t, unsigned int cmd, void *arg)
+static int do_saa5249_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
{
static int virtual_mode = FALSE;
+ struct video_device *vd = video_devdata(file);
+ struct saa5249_device *t=vd->priv;
switch(cmd)
{
*/
static int saa5249_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg)
+ unsigned int cmd, unsigned long arg)
{
struct video_device *vd = video_devdata(file);
struct saa5249_device *t=vd->priv;
int err;
down(&t->lock);
- err = do_saa5249_ioctl(t, cmd, arg);
+ err = video_usercopy(inode,file,cmd,arg,do_saa5249_ioctl);
up(&t->lock);
-
return err;
}
owner: THIS_MODULE,
open: saa5249_open,
release: saa5249_release,
- ioctl: video_generic_ioctl,
+ ioctl: saa5249_ioctl,
llseek: no_llseek,
};
type: VID_TYPE_TELETEXT, /*| VID_TYPE_TUNER ?? */
hardware: VID_HARDWARE_SAA5249,
fops: &saa_fops,
- kernel_ioctl: saa5249_ioctl,
};
MODULE_LICENSE("GPL");
static int w9966_i2c_rbyte(struct w9966_dev* cam);
static int w9966_v4l_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg);
+ unsigned int cmd, unsigned long arg);
static int w9966_v4l_read(struct file *file, char *buf,
size_t count, loff_t *ppos);
owner: THIS_MODULE,
open: video_exclusive_open,
release: video_exclusive_release,
- ioctl: video_generic_ioctl,
+ ioctl: w9966_v4l_ioctl,
read: w9966_v4l_read,
llseek: no_llseek,
};
type: VID_TYPE_CAPTURE | VID_TYPE_SCALES,
hardware: VID_HARDWARE_W9966,
fops: &w9966_fops,
- kernel_ioctl: w9966_v4l_ioctl,
};
/*
* Video4linux interfacing
*/
-static int w9966_v4l_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg)
+static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
{
struct video_device *vdev = video_devdata(file);
struct w9966_dev *cam = (struct w9966_dev*)vdev->priv;
return 0;
}
+static int w9966_v4l_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, w9966_v4l_do_ioctl);
+}
+
// Capture data
static int w9966_v4l_read(struct file *file, char *buf,
size_t count, loff_t *ppos)