]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: mali-c55: Initialise dev for tpg/rsz/isp subdevs
authorjempty.liang <imntjempty@163.com>
Tue, 13 Jan 2026 07:57:22 +0000 (07:57 +0000)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 19 May 2026 07:01:49 +0000 (09:01 +0200)
The subdevices registered by the Mali-C55 driver do not have their
'struct device *dev' member initialized. This is visibile when looking
at debug message, as in example:

"(NULL device *): collect_streams: sub-device 'mali-c55 tpg' does not
 support streams"

Fix this by initializing the *dev field for each subdevice registered
by the Mali-C55 driver.

Signed-off-by: jempty.liang <imntjempty@163.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c

index 4c0fd1ec741c3b2e0e800d37798cc7649e023523..dfa5dbe68c466a2e06e48ff456955002b92c7692 100644 (file)
@@ -583,6 +583,7 @@ int mali_c55_register_isp(struct mali_c55 *mali_c55)
        sd->entity.ops = &mali_c55_isp_media_ops;
        sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_ISP;
        sd->internal_ops = &mali_c55_isp_internal_ops;
+       sd->dev = mali_c55->dev;
        strscpy(sd->name, MALI_C55_DRIVER_NAME " isp", sizeof(sd->name));
 
        isp->pads[MALI_C55_ISP_PAD_SINK_VIDEO].flags = MEDIA_PAD_FL_SINK |
index a8d739af74b6c24d7d811461c295ec9a2d51db39..c4f46651dcee3aa7f755bfe8d29208b8a4df6b8a 100644 (file)
@@ -1070,6 +1070,7 @@ static int mali_c55_register_resizer(struct mali_c55 *mali_c55,
        sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
        sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
        sd->internal_ops = &mali_c55_resizer_internal_ops;
+       sd->dev = mali_c55->dev;
 
        rsz->pads[MALI_C55_RSZ_SINK_PAD].flags = MEDIA_PAD_FL_SINK;
        rsz->pads[MALI_C55_RSZ_SOURCE_PAD].flags = MEDIA_PAD_FL_SOURCE;
index 1af5d2759a8398cea64866e808434f7c0432f2a6..894f4cf377afc5cdbcdb2abd4ca0984bba446532 100644 (file)
@@ -370,6 +370,7 @@ int mali_c55_register_tpg(struct mali_c55 *mali_c55)
        sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
        sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
        sd->internal_ops = &mali_c55_tpg_internal_ops;
+       sd->dev = mali_c55->dev;
        strscpy(sd->name, MALI_C55_DRIVER_NAME " tpg", sizeof(sd->name));
 
        pad->flags = MEDIA_PAD_FL_SOURCE;