summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJonas Karlman <jonas@kwiboo.se>2019-04-25 10:12:27 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-05-15 12:37:50 +0300
commit76f2db08e000aa226961925459970942fbaf6720 (patch)
treed3156ac38f7c8c1595875250ddf2ffee5e196f1f /drivers
parent1199fa8c0ddd34dae6d72b653b27dfb3554e9b57 (diff)
downloadlinux-76f2db08e000aa226961925459970942fbaf6720.tar.xz
media: rockchip/vpu: Do not request id 0 for our video device
Pass -1 to video_register_device() to let the core assign the first free id instead of trying to get id 0. In practice it doesn't make a difference since video_register_device() is not strict about id requests and will anyway pick the first free id starting at the id passed in argument, and passing -1 has the same effect as passing 0. But let's comply with the API doc and pass -1 here. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
index 58721c46fba4..c00e2b47d5c1 100644
--- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
+++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
@@ -352,7 +352,7 @@ static int rockchip_vpu_video_device_register(struct rockchip_vpu_dev *vpu)
vpu->vfd_enc = vfd;
video_set_drvdata(vfd, vpu);
- ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
+ ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1);
if (ret) {
v4l2_err(&vpu->v4l2_dev, "Failed to register video device\n");
goto err_free_dev;