]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/zoran_driver.c
V4L/DVB (8951): xc5000: dont pass devptr in xc5000_attach()
[linux-2.6-omap-h63xx.git] / drivers / media / video / zoran_driver.c
index 2dab9eea4def302f7f934dab82426f3f71850134..f0af9b7f8ffc834987577d49c99dd29665f1c25b 100644 (file)
@@ -194,12 +194,6 @@ const struct zoran_format zoran_formats[] = {
 // RJ: Test only - want to test BUZ_USE_HIMEM even when CONFIG_BIGPHYS_AREA is defined
 
 
-extern int v4l_nbufs;
-extern int v4l_bufsize;
-extern int jpg_nbufs;
-extern int jpg_bufsize;
-extern int pass_through;
-
 static int lock_norm;  /* 0 = default 1 = Don't change TV standard (norm) */
 module_param(lock_norm, int, 0644);
 MODULE_PARM_DESC(lock_norm, "Prevent norm changes (1 = ignore, >1 = fail)");
@@ -1211,6 +1205,7 @@ zoran_open (struct inode *inode,
        struct zoran_fh *fh;
        int i, res, first_open = 0, have_module_locks = 0;
 
+       lock_kernel();
        /* find the device */
        for (i = 0; i < zoran_num; i++) {
                if (zoran[i]->video_dev->minor == minor) {
@@ -1321,6 +1316,7 @@ zoran_open (struct inode *inode,
        file->private_data = fh;
        fh->zr = zr;
        zoran_open_init_session(file);
+       unlock_kernel();
 
        return 0;
 
@@ -1338,6 +1334,7 @@ open_unlock_and_return:
        if (zr) {
                /*mutex_unlock(&zr->resource_lock);*/
        }
+       unlock_kernel();
 
        return res;
 }