mutex_unlock(&dev->core->lock);
                return -ENOMEM;
        }
+       v4l2_fh_init(&fh->fh, vdev);
        file->private_data = fh;
        fh->dev      = dev;
 
 
        dev->core->mpeg_users++;
        mutex_unlock(&dev->core->lock);
+       v4l2_fh_add(&fh->fh);
        return 0;
 }
 
 
        videobuf_mmap_free(&fh->mpegq);
 
+       v4l2_fh_del(&fh->fh);
+       v4l2_fh_exit(&fh->fh);
        file->private_data = NULL;
        kfree(fh);
 
 
        vfd->release = video_device_release;
        snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
                 core->name, type, core->board.name);
+       set_bit(V4L2_FL_USE_FH_PRIO, &vfd->flags);
        return vfd;
 }
 
 
        if (unlikely(!fh))
                return -ENOMEM;
 
+       v4l2_fh_init(&fh->fh, vdev);
        file->private_data = fh;
        fh->dev      = dev;
 
 
        core->users++;
        mutex_unlock(&core->lock);
+       v4l2_fh_add(&fh->fh);
 
        return 0;
 }
        videobuf_mmap_free(&fh->vbiq);
 
        mutex_lock(&dev->core->lock);
+       v4l2_fh_del(&fh->fh);
+       v4l2_fh_exit(&fh->fh);
        file->private_data = NULL;
        kfree(fh);
 
 
 #include <linux/kdev_t.h>
 
 #include <media/v4l2-device.h>
+#include <media/v4l2-fh.h>
 #include <media/tuner.h>
 #include <media/tveeprom.h>
 #include <media/videobuf-dma-sg.h>
 /* function 0: video stuff                                     */
 
 struct cx8800_fh {
+       struct v4l2_fh             fh;
        struct cx8800_dev          *dev;
        unsigned int               resources;
 
 /* function 2: mpeg stuff                                      */
 
 struct cx8802_fh {
+       struct v4l2_fh             fh;
        struct cx8802_dev          *dev;
        struct videobuf_queue      mpegq;
 };