diff mbox series

[8/9] media: atomisp: Make MC link from ISP to /dev/video# output node immutable

Message ID 20240217112438.15240-9-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series media: atomisp: Changes for libcamera support | expand

Commit Message

Hans de Goede Feb. 17, 2024, 11:24 a.m. UTC
The link from the ISP's source pad to the /dev/video# output v4l2-dev
is always enabled and immutable, mark it as such.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kieran Bingham Feb. 17, 2024, 3:22 p.m. UTC | #1
Quoting Hans de Goede (2024-02-17 11:24:37)
> The link from the ISP's source pad to the /dev/video# output v4l2-dev
> is always enabled and immutable, mark it as such.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> index 1a936dbe8eb4..86028721e7cb 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> @@ -1090,7 +1090,8 @@ int atomisp_register_device_nodes(struct atomisp_device *isp)
>                 return err;
>  
>         err = media_create_pad_link(&isp->asd.subdev.entity, ATOMISP_SUBDEV_PAD_SOURCE,
> -                                   &isp->asd.video_out.vdev.entity, 0, 0);
> +                                   &isp->asd.video_out.vdev.entity, 0,
> +                                   MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
>         if (err)
>                 return err;
>  
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index 1a936dbe8eb4..86028721e7cb 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -1090,7 +1090,8 @@  int atomisp_register_device_nodes(struct atomisp_device *isp)
 		return err;
 
 	err = media_create_pad_link(&isp->asd.subdev.entity, ATOMISP_SUBDEV_PAD_SOURCE,
-				    &isp->asd.video_out.vdev.entity, 0, 0);
+				    &isp->asd.video_out.vdev.entity, 0,
+				    MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
 	if (err)
 		return err;