提交 7213fe7e 编写于 作者: J Javier Martinez Canillas 提交者: Mauro Carvalho Chehab

[media] v4l: vsp1: create pad links after subdev registration

The vsp1 driver creates the pads links before the media entities are
registered with the media device. This doesn't work now that object
IDs are used to create links so the media_device has to be set.

Move entities registration logic before pads links creation.
Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 5837ceea
...@@ -250,6 +250,14 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) ...@@ -250,6 +250,14 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
list_add_tail(&wpf->entity.list_dev, &vsp1->entities); list_add_tail(&wpf->entity.list_dev, &vsp1->entities);
} }
/* Register all subdevs. */
list_for_each_entry(entity, &vsp1->entities, list_dev) {
ret = v4l2_device_register_subdev(&vsp1->v4l2_dev,
&entity->subdev);
if (ret < 0)
goto done;
}
/* Create links. */ /* Create links. */
list_for_each_entry(entity, &vsp1->entities, list_dev) { list_for_each_entry(entity, &vsp1->entities, list_dev) {
if (entity->type == VSP1_ENTITY_LIF || if (entity->type == VSP1_ENTITY_LIF ||
...@@ -269,14 +277,6 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) ...@@ -269,14 +277,6 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
return ret; return ret;
} }
/* Register all subdevs. */
list_for_each_entry(entity, &vsp1->entities, list_dev) {
ret = v4l2_device_register_subdev(&vsp1->v4l2_dev,
&entity->subdev);
if (ret < 0)
goto done;
}
ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev); ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev);
done: done:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册