summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/ov5645.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2024-02-20 01:16:21 +0000
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-02-23 14:33:32 +0100
commitc188df3db16798c7d26b45be9bbb4101599b04b5 (patch)
tree232edd9862cd715a6357ad8f7aeeb3976ddcd9b7 /drivers/media/i2c/ov5645.c
parent7b61650b3ce8b8b111f272936725399cd6f04602 (diff)
media: i2c: 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 Link: https://lore.kernel.org/r/9d1e99b0-892d-4a72-a9b3-886b8ed094b0@xs4all.nl 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/i2c/ov5645.c')
-rw-r--r--drivers/media/i2c/ov5645.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
index df86b951b9f3..3b22b9e12787 100644
--- a/drivers/media/i2c/ov5645.c
+++ b/drivers/media/i2c/ov5645.c
@@ -1059,7 +1059,7 @@ static int ov5645_probe(struct i2c_client *client)
ov5645->i2c_client = client;
ov5645->dev = dev;
- endpoint = of_graph_get_next_endpoint(dev->of_node, NULL);
+ endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
if (!endpoint) {
dev_err(dev, "endpoint node not found\n");
return -EINVAL;