Skip to content

Commit

Permalink
media: rockchip/vpu: Get vdev from the file arg in vidioc_querycap()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boris Brezillon authored and Mauro Carvalho Chehab committed May 15, 2019
1 parent 5c5b90f commit 2aa314b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ static int vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{
struct rockchip_vpu_dev *vpu = video_drvdata(file);
struct video_device *vdev = video_devdata(file);

strscpy(cap->driver, vpu->dev->driver->name, sizeof(cap->driver));
strscpy(cap->card, vpu->vfd_enc->name, sizeof(cap->card));
strscpy(cap->card, vdev->name, sizeof(cap->card));
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform: %s",
vpu->dev->driver->name);
return 0;
Expand Down

0 comments on commit 2aa314b

Please sign in to comment.