diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-06-04 14:19:52 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-05 15:19:12 +0300 |
commit | e83ce3005db16243e1085925251fd0776bb60d09 (patch) | |
tree | 69ae7135fa6c50a7fbdefa3d66aca32933a3921d /drivers/media/radio/radio-timb.c | |
parent | 7e98b7b542a456582ea3029be857cc99a3b19bd5 (diff) | |
download | linux-e83ce3005db16243e1085925251fd0776bb60d09.tar.xz |
media: media/radio: set device_caps in struct video_device
Instead of filling in the struct v4l2_capability device_caps
field, fill in the struct video_device device_caps field.
That way the V4L2 core knows what the capabilities of the
video device are.
But this only really works if all drivers use this, so convert
all radio drivers in this patch.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/radio/radio-timb.c')
-rw-r--r-- | drivers/media/radio/radio-timb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index 0eda863124e9..d92352005d3d 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c @@ -42,8 +42,6 @@ static int timbradio_vidioc_querycap(struct file *file, void *priv, strscpy(v->driver, DRIVER_NAME, sizeof(v->driver)); strscpy(v->card, "Timberdale Radio", sizeof(v->card)); snprintf(v->bus_info, sizeof(v->bus_info), "platform:"DRIVER_NAME); - v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } @@ -122,6 +120,7 @@ static int timbradio_probe(struct platform_device *pdev) tr->video_dev.release = video_device_release_empty; tr->video_dev.minor = -1; tr->video_dev.lock = &tr->lock; + tr->video_dev.device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; strscpy(tr->v4l2_dev.name, DRIVER_NAME, sizeof(tr->v4l2_dev.name)); err = v4l2_device_register(NULL, &tr->v4l2_dev); |