Skip to content

Commit 76f2db0

Browse files
Kwiboomchehab
authored andcommitted
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 <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 1199fa8 commit 76f2db0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int rockchip_vpu_video_device_register(struct rockchip_vpu_dev *vpu)
352352
vpu->vfd_enc = vfd;
353353
video_set_drvdata(vfd, vpu);
354354

355-
ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
355+
ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1);
356356
if (ret) {
357357
v4l2_err(&vpu->v4l2_dev, "Failed to register video device\n");
358358
goto err_free_dev;

0 commit comments

Comments
 (0)