Merge branch 'master' into for_paulus
[linux-drm-fsl-dcu.git] / drivers / media / video / cpia2 / cpia2_v4l.c
index 481e178ef56df58b197463a0ba250d94811b79d3..1bda7ad9de117b4bc290c8dfbe57b5d682229d62 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <linux/version.h>
 
-#include <linux/config.h>
 
 #include <linux/module.h>
 #include <linux/time.h>
@@ -343,7 +342,9 @@ static int cpia2_close(struct inode *inode, struct file *file)
                cpia2_free_buffers(cam);
                if (!cam->present) {
                        video_unregister_device(dev);
+                       mutex_unlock(&cam->busy_lock);
                        kfree(cam);
+                       return 0;
                }
        }
 
@@ -1167,9 +1168,9 @@ static int ioctl_g_ctrl(void *arg,struct camera_data *cam)
                } else {
                    if(cam->params.flicker_control.cam_register &
                       CPIA2_VP_FLICKER_MODES_50HZ) {
-                       mode = FLICKER_50;
+                       mode = FLICKER_50;
                    } else {
-                       mode = FLICKER_60;
+                       mode = FLICKER_60;
                    }
                }
                for(i=0; i<NUM_FLICKER_CONTROLS; i++) {
@@ -1923,7 +1924,7 @@ static void reset_camera_struct_v4l(struct camera_data *cam)
 /***
  * The v4l video device structure initialized for this device
  ***/
-static struct file_operations fops_template = {
+static const struct file_operations fops_template = {
        .owner          = THIS_MODULE,
        .open           = cpia2_open,
        .release        = cpia2_close,