]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/pwc/pwc-if.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / video / pwc / pwc-if.c
index 9aee7cb6f79a9e310e57021ac7d50a1fb73d0dc9..f3897a3fdb75b3542de06f693e60e213ed642f1a 100644 (file)
@@ -1112,7 +1112,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
 
        PWC_DEBUG_OPEN(">> video_open called(vdev = 0x%p).\n", vdev);
 
-       pdev = (struct pwc_device *)vdev->priv;
+       pdev = video_get_drvdata(vdev);
        BUG_ON(!pdev);
        if (pdev->vopen) {
                PWC_DEBUG_OPEN("I'm busy, someone is using the device.\n");
@@ -1233,7 +1233,7 @@ static int pwc_video_close(struct inode *inode, struct file *file)
        PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev);
 
        lock_kernel();
-       pdev = (struct pwc_device *)vdev->priv;
+       pdev = video_get_drvdata(vdev);
        if (pdev->vopen == 0)
                PWC_DEBUG_MODULE("video_close() called on closed device?\n");
 
@@ -1304,7 +1304,7 @@ static ssize_t pwc_video_read(struct file *file, char __user *buf,
                        vdev, buf, count);
        if (vdev == NULL)
                return -EFAULT;
-       pdev = vdev->priv;
+       pdev = video_get_drvdata(vdev);
        if (pdev == NULL)
                return -EFAULT;
 
@@ -1386,7 +1386,7 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait)
 
        if (vdev == NULL)
                return -EFAULT;
-       pdev = vdev->priv;
+       pdev = video_get_drvdata(vdev);
        if (pdev == NULL)
                return -EFAULT;
 
@@ -1408,7 +1408,7 @@ static int pwc_video_ioctl(struct inode *inode, struct file *file,
 
        if (!vdev)
                goto out;
-       pdev = vdev->priv;
+       pdev = video_get_drvdata(vdev);
 
        mutex_lock(&pdev->modlock);
        if (!pdev->unplugged)
@@ -1428,7 +1428,7 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
        int index;
 
        PWC_DEBUG_MEMORY(">> %s\n", __func__);
-       pdev = vdev->priv;
+       pdev = video_get_drvdata(vdev);
        size = vma->vm_end - vma->vm_start;
        start = vma->vm_start;
 
@@ -1795,7 +1795,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
                goto err;
        }
        else {
-               PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F);
+               PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->num);
        }
 
        /* occupy slot */