diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-04-08 06:23:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-14 18:55:38 -0400 |
commit | cd29ed853f90b39318643301d5389e80a7d466bc (patch) | |
tree | 48f483ff1d3b4c343ac7e1cdcba38dd4d9b4bbab /drivers/media/radio | |
parent | 03aa1bcd92eca82735e1de6d3e71bebf6e1c516e (diff) |
[media] radio-si4713: add prio checking and control events
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r-- | drivers/media/radio/radio-si4713.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c index f8c6137573a8..ba4cfc946868 100644 --- a/drivers/media/radio/radio-si4713.c +++ b/drivers/media/radio/radio-si4713.c | |||
@@ -31,6 +31,9 @@ | |||
31 | #include <media/v4l2-device.h> | 31 | #include <media/v4l2-device.h> |
32 | #include <media/v4l2-common.h> | 32 | #include <media/v4l2-common.h> |
33 | #include <media/v4l2-ioctl.h> | 33 | #include <media/v4l2-ioctl.h> |
34 | #include <media/v4l2-fh.h> | ||
35 | #include <media/v4l2-ctrls.h> | ||
36 | #include <media/v4l2-event.h> | ||
34 | #include <media/radio-si4713.h> | 37 | #include <media/radio-si4713.h> |
35 | 38 | ||
36 | /* module parameters */ | 39 | /* module parameters */ |
@@ -55,6 +58,9 @@ struct radio_si4713_device { | |||
55 | /* radio_si4713_fops - file operations interface */ | 58 | /* radio_si4713_fops - file operations interface */ |
56 | static const struct v4l2_file_operations radio_si4713_fops = { | 59 | static const struct v4l2_file_operations radio_si4713_fops = { |
57 | .owner = THIS_MODULE, | 60 | .owner = THIS_MODULE, |
61 | .open = v4l2_fh_open, | ||
62 | .release = v4l2_fh_release, | ||
63 | .poll = v4l2_ctrl_poll, | ||
58 | /* Note: locking is done at the subdev level in the i2c driver. */ | 64 | /* Note: locking is done at the subdev level in the i2c driver. */ |
59 | .unlocked_ioctl = video_ioctl2, | 65 | .unlocked_ioctl = video_ioctl2, |
60 | }; | 66 | }; |
@@ -126,6 +132,9 @@ static struct v4l2_ioctl_ops radio_si4713_ioctl_ops = { | |||
126 | .vidioc_s_modulator = radio_si4713_s_modulator, | 132 | .vidioc_s_modulator = radio_si4713_s_modulator, |
127 | .vidioc_g_frequency = radio_si4713_g_frequency, | 133 | .vidioc_g_frequency = radio_si4713_g_frequency, |
128 | .vidioc_s_frequency = radio_si4713_s_frequency, | 134 | .vidioc_s_frequency = radio_si4713_s_frequency, |
135 | .vidioc_log_status = v4l2_ctrl_log_status, | ||
136 | .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, | ||
137 | .vidioc_unsubscribe_event = v4l2_event_unsubscribe, | ||
129 | .vidioc_default = radio_si4713_default, | 138 | .vidioc_default = radio_si4713_default, |
130 | }; | 139 | }; |
131 | 140 | ||
@@ -187,6 +196,7 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev) | |||
187 | rsdev->radio_dev = radio_si4713_vdev_template; | 196 | rsdev->radio_dev = radio_si4713_vdev_template; |
188 | rsdev->radio_dev.v4l2_dev = &rsdev->v4l2_dev; | 197 | rsdev->radio_dev.v4l2_dev = &rsdev->v4l2_dev; |
189 | rsdev->radio_dev.ctrl_handler = sd->ctrl_handler; | 198 | rsdev->radio_dev.ctrl_handler = sd->ctrl_handler; |
199 | set_bit(V4L2_FL_USE_FH_PRIO, &rsdev->radio_dev.flags); | ||
190 | /* Serialize all access to the si4713 */ | 200 | /* Serialize all access to the si4713 */ |
191 | rsdev->radio_dev.lock = &rsdev->lock; | 201 | rsdev->radio_dev.lock = &rsdev->lock; |
192 | video_set_drvdata(&rsdev->radio_dev, rsdev); | 202 | video_set_drvdata(&rsdev->radio_dev, rsdev); |