]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/ov511.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6-omap-h63xx.git] / drivers / media / video / ov511.c
index 935d73de57bd3c8cf78ade18ff9245c2ab4c4799..9af5532db1423eb1d7971e5a00396a49c03f1959 100644 (file)
@@ -1098,9 +1098,10 @@ ov51x_clear_snapshot(struct usb_ov511 *ov)
                reg_w(ov, R51x_SYS_SNAP, 0x02);
                reg_w(ov, R51x_SYS_SNAP, 0x00);
        } else if (ov->bclass == BCL_OV518) {
-               warn("snapshot reset not supported yet on OV518(+)");
+               dev_warn(&ov->dev->dev,
+                        "snapshot reset not supported yet on OV518(+)\n");
        } else {
-               err("clear snap: invalid bridge type");
+               dev_err(&ov->dev->dev, "clear snap: invalid bridge type\n");
        }
 }
 
@@ -1115,14 +1116,16 @@ ov51x_check_snapshot(struct usb_ov511 *ov)
        if (ov->bclass == BCL_OV511) {
                ret = reg_r(ov, R51x_SYS_SNAP);
                if (ret < 0) {
-                       err("Error checking snspshot status (%d)", ret);
+                       dev_err(&ov->dev->dev,
+                               "Error checking snspshot status (%d)\n", ret);
                } else if (ret & 0x08) {
                        status = 1;
                }
        } else if (ov->bclass == BCL_OV518) {
-               warn("snapshot check not supported yet on OV518(+)");
+               dev_warn(&ov->dev->dev,
+                        "snapshot check not supported yet on OV518(+)\n");
        } else {
-               err("check snap: invalid bridge type");
+               dev_err(&ov->dev->dev, "clear snap: invalid bridge type\n");
        }
 
        return status;
@@ -3912,7 +3915,7 @@ ov51x_dealloc(struct usb_ov511 *ov)
  ***************************************************************************/
 
 static int
-ov51x_v4l1_open(struct inode *inode, struct file *file)
+ov51x_v4l1_open(struct file *file)
 {
        struct video_device *vdev = video_devdata(file);
        struct usb_ov511 *ov = video_get_drvdata(vdev);
@@ -3969,7 +3972,7 @@ out:
 }
 
 static int
-ov51x_v4l1_close(struct inode *inode, struct file *file)
+ov51x_v4l1_close(struct file *file)
 {
        struct video_device *vdev = file->private_data;
        struct usb_ov511 *ov = video_get_drvdata(vdev);
@@ -4007,9 +4010,8 @@ ov51x_v4l1_close(struct inode *inode, struct file *file)
 }
 
 /* Do not call this function directly! */
-static int
-ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file,
-                         unsigned int cmd, void *arg)
+static long
+ov51x_v4l1_ioctl_internal(struct file *file, unsigned int cmd, void *arg)
 {
        struct video_device *vdev = file->private_data;
        struct usb_ov511 *ov = video_get_drvdata(vdev);
@@ -4447,8 +4449,8 @@ redo:
        return 0;
 }
 
-static int
-ov51x_v4l1_ioctl(struct inode *inode, struct file *file,
+static long
+ov51x_v4l1_ioctl(struct file *file,
                 unsigned int cmd, unsigned long arg)
 {
        struct video_device *vdev = file->private_data;
@@ -4458,7 +4460,7 @@ ov51x_v4l1_ioctl(struct inode *inode, struct file *file,
        if (mutex_lock_interruptible(&ov->lock))
                return -EINTR;
 
-       rc = video_usercopy(inode, file, cmd, arg, ov51x_v4l1_ioctl_internal);
+       rc = video_usercopy(file, cmd, arg, ov51x_v4l1_ioctl_internal);
 
        mutex_unlock(&ov->lock);
        return rc;
@@ -4659,17 +4661,13 @@ ov51x_v4l1_mmap(struct file *file, struct vm_area_struct *vma)
        return 0;
 }
 
-static const struct file_operations ov511_fops = {
+static const struct v4l2_file_operations ov511_fops = {
        .owner =        THIS_MODULE,
        .open =         ov51x_v4l1_open,
        .release =      ov51x_v4l1_close,
        .read =         ov51x_v4l1_read,
        .mmap =         ov51x_v4l1_mmap,
        .ioctl =        ov51x_v4l1_ioctl,
-#ifdef CONFIG_COMPAT
-       .compat_ioctl = v4l_compat_ioctl32,
-#endif
-       .llseek =       no_llseek,
 };
 
 static struct video_device vdev_template = {
@@ -5217,7 +5215,8 @@ saa7111a_configure(struct usb_ov511 *ov)
        if (ov->bclass == BCL_OV511)
                reg_w(ov, 0x11, 0x00);
        else
-               warn("SAA7111A not yet supported with OV518/OV518+");
+               dev_warn(&ov->dev->dev,
+                        "SAA7111A not yet supported with OV518/OV518+\n");
 
        return 0;
 }
@@ -5456,7 +5455,8 @@ ov518_configure(struct usb_ov511 *ov)
         * required. OV518 has no uncompressed mode, to save RAM. */
        if (!dumppix && !ov->compress) {
                ov->compress = 1;
-               warn("Compression required with OV518...enabling");
+               dev_warn(&ov->dev->dev,
+                        "Compression required with OV518...enabling\n");
        }
 
        if (ov->bridge == BRG_OV518) {