diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2019-04-25 03:12:29 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-05-15 05:38:06 -0400 |
commit | 2aa314b4f52f644d7995b8e7ddc831e6e0e1851c (patch) | |
tree | 2a96c8c9d646d87dc46d154c96114929005f5cbc | |
parent | 5c5b90f5cbad77dc15d8b5582efdb2e362bcd710 (diff) |
media: rockchip/vpu: Get vdev from the file arg in vidioc_querycap()
This makes the function more generic so it can easily be re-used when
adding support for the decoding functionality.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c index fb5e36aedd8c..dcbfc3cbc9f3 100644 --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c | |||
@@ -152,9 +152,10 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
152 | struct v4l2_capability *cap) | 152 | struct v4l2_capability *cap) |
153 | { | 153 | { |
154 | struct rockchip_vpu_dev *vpu = video_drvdata(file); | 154 | struct rockchip_vpu_dev *vpu = video_drvdata(file); |
155 | struct video_device *vdev = video_devdata(file); | ||
155 | 156 | ||
156 | strscpy(cap->driver, vpu->dev->driver->name, sizeof(cap->driver)); | 157 | strscpy(cap->driver, vpu->dev->driver->name, sizeof(cap->driver)); |
157 | strscpy(cap->card, vpu->vfd_enc->name, sizeof(cap->card)); | 158 | strscpy(cap->card, vdev->name, sizeof(cap->card)); |
158 | snprintf(cap->bus_info, sizeof(cap->bus_info), "platform: %s", | 159 | snprintf(cap->bus_info, sizeof(cap->bus_info), "platform: %s", |
159 | vpu->dev->driver->name); | 160 | vpu->dev->driver->name); |
160 | return 0; | 161 | return 0; |