]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/usbvideo/vicam.c
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / video / usbvideo / vicam.c
index efb878a7402e1f90cd2e7b8dcd5b247569cd5b16..8e2d58bec48120c1991c78fd3f8be963c5095f47 100644 (file)
@@ -472,9 +472,8 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign
 static int
 vicam_open(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct vicam_camera *cam =
-           (struct vicam_camera *) dev->priv;
+       struct vicam_camera *cam = video_drvdata(file);
+
        DBG("open\n");
 
        if (!cam) {
@@ -801,6 +800,7 @@ static struct video_device vicam_template = {
        .name           = "ViCam-based USB Camera",
        .fops           = &vicam_fops,
        .minor          = -1,
+       .release        = video_device_release_empty,
 };
 
 /* table of devices that work with this driver */
@@ -865,9 +865,8 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
 
        mutex_init(&cam->cam_lock);
 
-       memcpy(&cam->vdev, &vicam_template,
-              sizeof (vicam_template));
-       cam->vdev.priv = cam;   // sort of a reverse mapping for those functions that get vdev only
+       memcpy(&cam->vdev, &vicam_template, sizeof(vicam_template));
+       video_set_drvdata(&cam->vdev, cam);
 
        cam->udev = dev;
        cam->bulkEndpoint = bulkEndpoint;
@@ -878,7 +877,8 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
                return -EIO;
        }
 
-       printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor);
+       printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",
+                       cam->vdev.num);
 
        usb_set_intfdata (intf, cam);