summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/adv7343.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/adv7343.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/adv7343.c')
-rw-r--r--drivers/media/i2c/adv7343.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/adv7343.c b/drivers/media/i2c/adv7343.c
index ff21cd4744d3..4fbe4e18570e 100644
--- a/drivers/media/i2c/adv7343.c
+++ b/drivers/media/i2c/adv7343.c
@@ -403,7 +403,7 @@ adv7343_get_pdata(struct i2c_client *client)
if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node)
return client->dev.platform_data;
- np = of_graph_get_next_endpoint(client->dev.of_node, NULL);
+ np = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1);
if (!np)
return NULL;