diff options
author | Eizan Miyamoto <eizan@chromium.org> | 2020-05-07 12:23:48 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-07-04 12:00:49 +0200 |
commit | 86698b9505bbc97b1cd6d8e9a2e7b8604a079469 (patch) | |
tree | c08082f46583bdd46cd70127afb634e55f3a771c /drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | |
parent | ee18fc7b0b9517ac62711da1b95095f122aead94 (diff) |
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 <eizan@chromium.org>
Reviewed-by: Enric Balletbo I Serra <enric.balletbo@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/mtk-mdp/mtk_mdp_comp.c')
-rw-r--r-- | drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |