]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/media/video/cx23885/cx23885-video.c
[media] v4l: kill the BKL
[mirror_ubuntu-jammy-kernel.git] / drivers / media / video / cx23885 / cx23885-video.c
index da66e5f8d91d1c40d60042d14bdd3c8f4cb21b36..3cc9f462d08d9d1d391b8cfcec5fbebc6b6c66d4 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/kmod.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
-#include <linux/smp_lock.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <linux/kthread.h>
@@ -743,8 +742,6 @@ static int video_open(struct file *file)
        if (NULL == fh)
                return -ENOMEM;
 
-       lock_kernel();
-
        file->private_data = fh;
        fh->dev      = dev;
        fh->radio    = radio;
@@ -758,12 +755,10 @@ static int video_open(struct file *file)
                            V4L2_BUF_TYPE_VIDEO_CAPTURE,
                            V4L2_FIELD_INTERLACED,
                            sizeof(struct cx23885_buffer),
-                           fh);
+                           fh, NULL);
 
        dprintk(1, "post videobuf_queue_init()\n");
 
-       unlock_kernel();
-
        return 0;
 }
 
@@ -1165,9 +1160,10 @@ static int cx23885_enum_input(struct cx23885_dev *dev, struct v4l2_input *i)
        i->type  = V4L2_INPUT_TYPE_CAMERA;
        strcpy(i->name, iname[INPUT(n)->type]);
        if ((CX23885_VMUX_TELEVISION == INPUT(n)->type) ||
-               (CX23885_VMUX_CABLE == INPUT(n)->type))
+               (CX23885_VMUX_CABLE == INPUT(n)->type)) {
                i->type = V4L2_INPUT_TYPE_TUNER;
                i->std = CX23885_NORMS;
+       }
        return 0;
 }
 
@@ -1511,11 +1507,11 @@ int cx23885_video_register(struct cx23885_dev *dev)
                if (dev->tuner_addr)
                        sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
                                &dev->i2c_bus[1].i2c_adap,
-                               "tuner", "tuner", dev->tuner_addr, NULL);
+                               NULL, "tuner", dev->tuner_addr, NULL);
                else
                        sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
-                               &dev->i2c_bus[1].i2c_adap,
-                               "tuner", "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_TV));
+                               &dev->i2c_bus[1].i2c_adap, NULL,
+                               "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_TV));
                if (sd) {
                        struct tuner_setup tun_setup;