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-tea5764.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-tea5764.c')
-rw-r--r-- | drivers/media/radio/radio-tea5764.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/radio/radio-tea5764.c b/drivers/media/radio/radio-tea5764.c index 6632be648cea..fc8afbc0fb22 100644 --- a/drivers/media/radio/radio-tea5764.c +++ b/drivers/media/radio/radio-tea5764.c @@ -291,8 +291,6 @@ static int vidioc_querycap(struct file *file, void *priv, strscpy(v->card, dev->name, sizeof(v->card)); snprintf(v->bus_info, sizeof(v->bus_info), "I2C:%s", dev_name(&dev->dev)); - v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } @@ -474,6 +472,7 @@ static int tea5764_i2c_probe(struct i2c_client *client, video_set_drvdata(&radio->vdev, radio); radio->vdev.lock = &radio->mutex; radio->vdev.v4l2_dev = v4l2_dev; + radio->vdev.device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; /* initialize and power off the chip */ tea5764_i2c_read(radio); |