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>
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 |
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;
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;