media: atomisp: Properly initialize function field of media-entity links
authorHans de Goede <hdegoede@redhat.com>
Sun, 29 Jan 2023 21:01:20 +0000 (22:01 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 07:08:08 +0000 (08:08 +0100)
Don't use MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN to initialize the function field
of various media-entity links.

This fixes the following warnings showing up in dmesg:

 atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port0 was not initialized!
 atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port1 was not initialized!
 atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port2 was not initialized!
 atomisp-isp2 0000:00:03.0: Entity type for entity tpg_subdev was not initialized!
 atomisp-isp2 0000:00:03.0: Entity type for entity ATOMISP_SUBDEV_0 was not initialized!
 atomisp-isp2 0000:00:03.0: Entity type for entity ATOMISP_SUBDEV_1 was not initialized!

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_csi2.c
drivers/staging/media/atomisp/pci/atomisp_subdev.c
drivers/staging/media/atomisp/pci/atomisp_tpg.c

index 7853a23..b00bc0b 100644 (file)
@@ -203,7 +203,7 @@ static int mipi_csi2_init_entities(struct atomisp_mipi_csi2_device *csi2,
        pads[CSI2_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
 
        me->ops = &csi2_media_ops;
-       me->function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
+       me->function = MEDIA_ENT_F_VID_IF_BRIDGE;
        ret = media_entity_pads_init(me, CSI2_PADS_NUM, pads);
        if (ret < 0)
                return ret;
index 52d1936..9cfb85c 100644 (file)
@@ -1017,7 +1017,7 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
            MEDIA_BUS_FMT_SBGGR10_1X10;
 
        me->ops = &isp_subdev_media_ops;
-       me->function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
+       me->function = MEDIA_ENT_F_PROC_VIDEO_ISP;
        ret = media_entity_pads_init(me, ATOMISP_SUBDEV_PADS_NUM, pads);
        if (ret < 0)
                return ret;
index e29a96d..074826a 100644 (file)
@@ -152,7 +152,7 @@ int atomisp_tpg_init(struct atomisp_device *isp)
        v4l2_set_subdevdata(sd, tpg);
 
        pads[0].flags = MEDIA_PAD_FL_SINK;
-       me->function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
+       me->function = MEDIA_ENT_F_PROC_VIDEO_ISP;
 
        ret = media_entity_pads_init(me, 1, pads);
        if (ret < 0)