diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2024-02-20 04:16:36 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-02-23 16:33:32 +0300 |
commit | 5848915b912d7607dcf59ca6d89b81ef70a62d4f (patch) | |
tree | 71ffcd16f0dfc478fcf2f199af3c39f377691a0a /drivers/media/platform/st/stm32/stm32-dcmi.c | |
parent | c188df3db16798c7d26b45be9bbb4101599b04b5 (diff) | |
download | linux-5848915b912d7607dcf59ca6d89b81ef70a62d4f.tar.xz |
media: platform: replace of_graph_get_next_endpoint()
From DT point of view, in general, drivers should be asking for a
specific port number because their function is fixed in the binding.
of_graph_get_next_endpoint() doesn't match to this concept.
Simply replace
- of_graph_get_next_endpoint(xxx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/st/stm32/stm32-dcmi.c')
-rw-r--r-- | drivers/media/platform/st/stm32/stm32-dcmi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c index c4610e305546..ff3331af9406 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmi.c +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c @@ -1855,7 +1855,7 @@ static int dcmi_graph_init(struct stm32_dcmi *dcmi) struct device_node *ep; int ret; - ep = of_graph_get_next_endpoint(dcmi->dev->of_node, NULL); + ep = of_graph_get_endpoint_by_regs(dcmi->dev->of_node, 0, -1); if (!ep) { dev_err(dcmi->dev, "Failed to get next endpoint\n"); return -EINVAL; @@ -1907,7 +1907,7 @@ static int dcmi_probe(struct platform_device *pdev) "Could not get reset control\n"); /* Get bus characteristics from devicetree */ - np = of_graph_get_next_endpoint(np, NULL); + np = of_graph_get_endpoint_by_regs(np, 0, -1); if (!np) { dev_err(&pdev->dev, "Could not find the endpoint\n"); return -ENODEV; |