From 86698b9505bbc97b1cd6d8e9a2e7b8604a079469 Mon Sep 17 00:00:00 2001 From: Eizan Miyamoto Date: Thu, 7 May 2020 12:23:48 +0200 Subject: media: mtk-mdp: convert mtk_mdp_dev.comp array to list The functions mtk_mdp_register/unregister_component have been created to add / remove items from the list of components. This will eventually enable us to specify a list of components in the device tree instead of hardcoding them into this driver. The list is modified by a single thread at driver probe time, and will not be traversed by another thread until the call to pm_runtime_enable at the end of probing. Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo I Serra Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/media/platform/mtk-mdp/mtk_mdp_comp.c') diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c index c76cd61fb178..da2bdad7a8d1 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c @@ -103,6 +103,7 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node, return -EINVAL; } + INIT_LIST_HEAD(&comp->node); comp->dev_node = of_node_get(node); comp->id = comp_id; comp->type = mtk_mdp_matches[comp_id].type; -- cgit