Commit d6d3fe2f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] saa7164: add v4l2_fh support

Control events require the use of struct v4l2_fh. Add this to saa7164.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 1a708ea0
......@@ -746,8 +746,10 @@ static int fops_open(struct file *file)
if (NULL == fh)
return -ENOMEM;
file->private_data = fh;
fh->port = port;
v4l2_fh_init(&fh->fh, video_devdata(file));
v4l2_fh_add(&fh->fh);
file->private_data = fh;
return 0;
}
......@@ -768,7 +770,8 @@ static int fops_release(struct file *file)
}
}
file->private_data = NULL;
v4l2_fh_del(&fh->fh);
v4l2_fh_exit(&fh->fh);
kfree(fh);
return 0;
......
......@@ -678,8 +678,10 @@ static int fops_open(struct file *file)
if (NULL == fh)
return -ENOMEM;
file->private_data = fh;
fh->port = port;
v4l2_fh_init(&fh->fh, video_devdata(file));
v4l2_fh_add(&fh->fh);
file->private_data = fh;
return 0;
}
......@@ -700,7 +702,8 @@ static int fops_release(struct file *file)
}
}
file->private_data = NULL;
v4l2_fh_del(&fh->fh);
v4l2_fh_exit(&fh->fh);
kfree(fh);
return 0;
......
......@@ -186,11 +186,13 @@ struct saa7164_subid {
};
struct saa7164_encoder_fh {
struct v4l2_fh fh;
struct saa7164_port *port;
atomic_t v4l_reading;
};
struct saa7164_vbi_fh {
struct v4l2_fh fh;
struct saa7164_port *port;
atomic_t v4l_reading;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment