From f372f2854279828a33b9b3debc233d366fb4c124 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 8 Jul 2024 11:47:49 +0100 Subject: [PATCH 1161/1215] media: pisp_be: Re-introduce video node offset Offset the backend dev-nodes starting at /dev/video20 onwards to maintain backward compatibility with the pre-upstreamed kernel driver. Signed-off-by: Naushir Patuck --- drivers/media/platform/raspberrypi/pisp_be/pisp_be.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c +++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c @@ -21,6 +21,9 @@ #include "pisp_be_formats.h" +/* Offset to use when registering the /dev/videoX node */ +#define PISPBE_VIDEO_NODE_OFFSET 20 + /* Maximum number of config buffers possible */ #define PISP_BE_NUM_CONFIG_BUFFERS VB2_MAX_FRAME @@ -1484,7 +1487,8 @@ static int pispbe_init_node(struct pispb goto err_unregister_queue; } - ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1); + ret = video_register_device(vdev, VFL_TYPE_VIDEO, + PISPBE_VIDEO_NODE_OFFSET); if (ret) { dev_err(pispbe->dev, "Failed to register video %s device node\n",