static int w9966_exclusive_open(struct inode *inode, struct file *file)
{
- struct video_device *vdev = video_devdata(file);
- struct w9966_dev *cam = video_get_drvdata(vdev);
+ struct w9966_dev *cam = video_drvdata(file);
return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0;
}
static int w9966_exclusive_release(struct inode *inode, struct file *file)
{
- struct video_device *vdev = video_devdata(file);
- struct w9966_dev *cam = video_get_drvdata(vdev);
+ struct w9966_dev *cam = video_drvdata(file);
clear_bit(0, &cam->in_use);
return 0;
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 = video_get_drvdata(vdev);
+ struct w9966_dev *cam = video_drvdata(file);
switch(cmd)
{
static ssize_t w9966_v4l_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- struct video_device *vdev = video_devdata(file);
- struct w9966_dev *cam = video_get_drvdata(vdev);
+ struct w9966_dev *cam = video_drvdata(file);
unsigned char addr = 0xa0; // ECP, read, CCD-transfer, 00000
unsigned char __user *dest = (unsigned char __user *)buf;
unsigned long dleft = count;