Skip to content

Commit 2aa314b

Browse files
bbrezillonmchehab
authored andcommitted
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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 5c5b90f commit 2aa314b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ static int vidioc_querycap(struct file *file, void *priv,
152152
struct v4l2_capability *cap)
153153
{
154154
struct rockchip_vpu_dev *vpu = video_drvdata(file);
155+
struct video_device *vdev = video_devdata(file);
155156

156157
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));
158159
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform: %s",
159160
vpu->dev->driver->name);
160161
return 0;

0 commit comments

Comments
 (0)