@@ -42,6 +42,7 @@
#include <linux/io.h> /* outb, outb_p */
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
+#include <media/v4l2-fh.h>
MODULE_AUTHOR("Fred Gleason, Russell Kroll, Quay Lu, Donald Song, Jason Lewis, Scott McGrath, William McGrath");
MODULE_DESCRIPTION("A driver for the ADS Cadet AM/FM/RDS radio card.");
@@ -526,7 +527,10 @@ static int vidioc_s_audio(struct file *file, void *priv,
static int cadet_open(struct file *file)
{
struct cadet *dev = video_drvdata(file);
+ int ret = v4l2_fh_open(file);
+ if (ret)
+ return ret;
mutex_lock(&dev->lock);
dev->users++;
if (1 == dev->users)
@@ -546,7 +550,7 @@ static int cadet_release(struct file *file)
dev->rdsstat = 0;
}
mutex_unlock(&dev->lock);
- return 0;
+ return v4l2_fh_release(file);
}
static unsigned int cadet_poll(struct file *file, struct poll_table_struct *wait)