V4L/DVB (12504): soc-camera: prepare soc_camera_platform.c and its users for conversion
[safe/jmp/linux-2.6] / drivers / media / video / omap24xxcam.c
index 85c3c7c..5fc4ac0 100644 (file)
@@ -80,17 +80,17 @@ static int omap24xxcam_clock_get(struct omap24xxcam_device *cam)
 {
        int rval = 0;
 
-       cam->fck = clk_get(cam->dev, "cam_fck");
+       cam->fck = clk_get(cam->dev, "fck");
        if (IS_ERR(cam->fck)) {
-               dev_err(cam->dev, "can't get cam_fck");
+               dev_err(cam->dev, "can't get camera fck");
                rval = PTR_ERR(cam->fck);
                omap24xxcam_clock_put(cam);
                return rval;
        }
 
-       cam->ick = clk_get(cam->dev, "cam_ick");
+       cam->ick = clk_get(cam->dev, "ick");
        if (IS_ERR(cam->ick)) {
-               dev_err(cam->dev, "can't get cam_ick");
+               dev_err(cam->dev, "can't get camera ick");
                rval = PTR_ERR(cam->ick);
                omap24xxcam_clock_put(cam);
        }
@@ -1285,9 +1285,6 @@ static int vidioc_g_parm(struct file *file, void *fh,
        struct omap24xxcam_device *cam = ofh->cam;
        int rval;
 
-       if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-               return -EINVAL;
-
        mutex_lock(&cam->mutex);
        rval = vidioc_int_g_parm(cam->sdev, a);
        mutex_unlock(&cam->mutex);
@@ -1303,9 +1300,6 @@ static int vidioc_s_parm(struct file *file, void *fh,
        struct v4l2_streamparm old_streamparm;
        int rval;
 
-       if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-               return -EINVAL;
-
        mutex_lock(&cam->mutex);
        if (cam->streaming) {
                rval = -EBUSY;
@@ -1454,9 +1448,9 @@ static int omap24xxcam_mmap(struct file *file, struct vm_area_struct *vma)
        return rval;
 }
 
-static int omap24xxcam_open(struct inode *inode, struct file *file)
+static int omap24xxcam_open(struct file *file)
 {
-       int minor = iminor(inode);
+       int minor = video_devdata(file)->minor;
        struct omap24xxcam_device *cam = omap24xxcam.priv;
        struct omap24xxcam_fh *fh;
        struct v4l2_format format;
@@ -1511,7 +1505,7 @@ out_try_module_get:
        return -ENODEV;
 }
 
-static int omap24xxcam_release(struct inode *inode, struct file *file)
+static int omap24xxcam_release(struct file *file)
 {
        struct omap24xxcam_fh *fh = file->private_data;
        struct omap24xxcam_device *cam = fh->cam;
@@ -1559,8 +1553,7 @@ static int omap24xxcam_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static struct file_operations omap24xxcam_fops = {
-       .llseek  = no_llseek,
+static struct v4l2_file_operations omap24xxcam_fops = {
        .ioctl   = video_ioctl2,
        .poll    = omap24xxcam_poll,
        .mmap    = omap24xxcam_mmap,
@@ -1666,7 +1659,6 @@ static int omap24xxcam_device_register(struct v4l2_int_device *s)
        vfd->parent = cam->dev;
 
        strlcpy(vfd->name, CAM_NAME, sizeof(vfd->name));
-       vfd->vfl_type            = VID_TYPE_CAPTURE | VID_TYPE_CHROMAKEY;
        vfd->fops                = &omap24xxcam_fops;
        vfd->minor               = -1;
        vfd->ioctl_ops           = &omap24xxcam_ioctl_fops;