diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-02-03 07:33:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 08:31:12 -0400 |
commit | 46821b1d206cbafab54fa0ba6dd80904722326e2 (patch) | |
tree | c69b7d601df050dfbc8be117919daf2106883541 /drivers/media/radio/radio-timb.c | |
parent | 5bd8d2abe1edef2559bcfb23e6028df79f81c6e2 (diff) |
[media] radio-timb: add control events and prio support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/radio-timb.c')
-rw-r--r-- | drivers/media/radio/radio-timb.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index 1931ef778fcd..0817964d9172 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <media/v4l2-ioctl.h> | 20 | #include <media/v4l2-ioctl.h> |
21 | #include <media/v4l2-device.h> | 21 | #include <media/v4l2-device.h> |
22 | #include <media/v4l2-ctrls.h> | ||
23 | #include <media/v4l2-event.h> | ||
22 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
23 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
24 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
@@ -83,10 +85,16 @@ static const struct v4l2_ioctl_ops timbradio_ioctl_ops = { | |||
83 | .vidioc_s_tuner = timbradio_vidioc_s_tuner, | 85 | .vidioc_s_tuner = timbradio_vidioc_s_tuner, |
84 | .vidioc_g_frequency = timbradio_vidioc_g_frequency, | 86 | .vidioc_g_frequency = timbradio_vidioc_g_frequency, |
85 | .vidioc_s_frequency = timbradio_vidioc_s_frequency, | 87 | .vidioc_s_frequency = timbradio_vidioc_s_frequency, |
88 | .vidioc_log_status = v4l2_ctrl_log_status, | ||
89 | .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, | ||
90 | .vidioc_unsubscribe_event = v4l2_event_unsubscribe, | ||
86 | }; | 91 | }; |
87 | 92 | ||
88 | static const struct v4l2_file_operations timbradio_fops = { | 93 | static const struct v4l2_file_operations timbradio_fops = { |
89 | .owner = THIS_MODULE, | 94 | .owner = THIS_MODULE, |
95 | .open = v4l2_fh_open, | ||
96 | .release = v4l2_fh_release, | ||
97 | .poll = v4l2_ctrl_poll, | ||
90 | .unlocked_ioctl = video_ioctl2, | 98 | .unlocked_ioctl = video_ioctl2, |
91 | }; | 99 | }; |
92 | 100 | ||
@@ -118,6 +126,7 @@ static int timbradio_probe(struct platform_device *pdev) | |||
118 | tr->video_dev.release = video_device_release_empty; | 126 | tr->video_dev.release = video_device_release_empty; |
119 | tr->video_dev.minor = -1; | 127 | tr->video_dev.minor = -1; |
120 | tr->video_dev.lock = &tr->lock; | 128 | tr->video_dev.lock = &tr->lock; |
129 | set_bit(V4L2_FL_USE_FH_PRIO, &tr->video_dev.flags); | ||
121 | 130 | ||
122 | strlcpy(tr->v4l2_dev.name, DRIVER_NAME, sizeof(tr->v4l2_dev.name)); | 131 | strlcpy(tr->v4l2_dev.name, DRIVER_NAME, sizeof(tr->v4l2_dev.name)); |
123 | err = v4l2_device_register(NULL, &tr->v4l2_dev); | 132 | err = v4l2_device_register(NULL, &tr->v4l2_dev); |