diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2024-02-20 04:16:21 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-02-23 16:33:32 +0300 |
commit | c188df3db16798c7d26b45be9bbb4101599b04b5 (patch) | |
tree | 232edd9862cd715a6357ad8f7aeeb3976ddcd9b7 /drivers/media/i2c/s5k5baf.c | |
parent | 7b61650b3ce8b8b111f272936725399cd6f04602 (diff) | |
download | linux-c188df3db16798c7d26b45be9bbb4101599b04b5.tar.xz |
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/s5k5baf.c')
-rw-r--r-- | drivers/media/i2c/s5k5baf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c index de079d2c9282..6b11039c3579 100644 --- a/drivers/media/i2c/s5k5baf.c +++ b/drivers/media/i2c/s5k5baf.c @@ -1849,7 +1849,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev) state->mclk_frequency); } - node_ep = of_graph_get_next_endpoint(node, NULL); + node_ep = of_graph_get_endpoint_by_regs(node, 0, -1); if (!node_ep) { dev_err(dev, "no endpoint defined at node %pOF\n", node); return -EINVAL; |