* [PATCH v2 1/8] gpu: drm: use for_each_endpoint_of_node()
2024-04-01 0:01 [PATCH v2 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
@ 2024-02-02 1:28 ` Kuninori Morimoto
2024-04-01 0:05 ` [PATCH v2 2/8] hwtracing: " Kuninori Morimoto
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2024-02-02 1:28 UTC (permalink / raw)
To: Lad Prabhakar, Alexander Shishkin, Alexandre Belloni,
Claudiu Beznea, Daniel Vetter, David Airlie, Eugen Hristev,
Greg Kroah-Hartman, Helge Deller, Laurent Pinchart,
Maarten Lankhorst, Mauro Carvalho Chehab, Maxime Ripard,
Michal Simek, Nicolas Ferre, Rob Herring, Suzuki K Poulose,
Thomas Zimmermann, Tomi Valkeinen, coresight, dri-devel,
linux-arm-kernel, linux-fbdev, linux-media
We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/gpu/drm/omapdrm/dss/base.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c
index 050ca7eafac5..5f8002f6bb7a 100644
--- a/drivers/gpu/drm/omapdrm/dss/base.c
+++ b/drivers/gpu/drm/omapdrm/dss/base.c
@@ -242,8 +242,7 @@ static void omapdss_walk_device(struct device *dev, struct device_node *node,
of_node_put(n);
- n = NULL;
- while ((n = of_graph_get_next_endpoint(node, n)) != NULL) {
+ for_each_endpoint_of_node(node, n) {
struct device_node *pn = of_graph_get_remote_port_parent(n);
if (!pn)
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 2/8] hwtracing: use for_each_endpoint_of_node()
2024-04-01 0:01 [PATCH v2 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
2024-02-02 1:28 ` [PATCH v2 1/8] gpu: drm: " Kuninori Morimoto
@ 2024-04-01 0:05 ` Kuninori Morimoto
2024-04-01 0:05 ` [PATCH v2 3/8] media: platform: microchip: " Kuninori Morimoto
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2024-04-01 0:05 UTC (permalink / raw)
To: Lad Prabhakar, Alexander Shishkin, Alexandre Belloni,
Claudiu Beznea, Daniel Vetter, David Airlie, Eugen Hristev,
Greg Kroah-Hartman, Helge Deller, Laurent Pinchart,
Maarten Lankhorst, Mauro Carvalho Chehab, Maxime Ripard,
Michal Simek, Nicolas Ferre, Rob Herring, Suzuki K Poulose,
Thomas Zimmermann, Tomi Valkeinen, coresight, dri-devel,
linux-arm-kernel, linux-fbdev, linux-media
We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
drivers/hwtracing/coresight/coresight-platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c
index 9d550f5697fa..e9683e613d52 100644
--- a/drivers/hwtracing/coresight/coresight-platform.c
+++ b/drivers/hwtracing/coresight/coresight-platform.c
@@ -275,7 +275,7 @@ static int of_get_coresight_platform_data(struct device *dev,
*/
if (!parent) {
/*
- * Avoid warnings in of_graph_get_next_endpoint()
+ * Avoid warnings in for_each_endpoint_of_node()
* if the device doesn't have any graph connections
*/
if (!of_graph_is_present(node))
@@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct device *dev,
}
/* Iterate through each output port to discover topology */
- while ((ep = of_graph_get_next_endpoint(parent, ep))) {
+ for_each_endpoint_of_node(parent, ep) {
/*
* Legacy binding mixes input/output ports under the
* same parent. So, skip the input ports if we are dealing
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 3/8] media: platform: microchip: use for_each_endpoint_of_node()
2024-04-01 0:01 [PATCH v2 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
2024-02-02 1:28 ` [PATCH v2 1/8] gpu: drm: " Kuninori Morimoto
2024-04-01 0:05 ` [PATCH v2 2/8] hwtracing: " Kuninori Morimoto
@ 2024-04-01 0:05 ` Kuninori Morimoto
2024-04-01 0:05 ` [PATCH v2 4/8] media: platform: ti: " Kuninori Morimoto
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2024-04-01 0:05 UTC (permalink / raw)
To: Lad Prabhakar, Alexander Shishkin, Alexandre Belloni,
Claudiu Beznea, Daniel Vetter, David Airlie, Eugen Hristev,
Greg Kroah-Hartman, Helge Deller, Laurent Pinchart,
Maarten Lankhorst, Mauro Carvalho Chehab, Maxime Ripard,
Michal Simek, Nicolas Ferre, Rob Herring, Suzuki K Poulose,
Thomas Zimmermann, Tomi Valkeinen, coresight, dri-devel,
linux-arm-kernel, linux-fbdev, linux-media
We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
.../microchip/microchip-sama5d2-isc.c | 19 +++++++------------
.../microchip/microchip-sama7g5-isc.c | 19 +++++++------------
2 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/drivers/media/platform/microchip/microchip-sama5d2-isc.c b/drivers/media/platform/microchip/microchip-sama5d2-isc.c
index 5ac149cf3647..d9298771f509 100644
--- a/drivers/media/platform/microchip/microchip-sama5d2-isc.c
+++ b/drivers/media/platform/microchip/microchip-sama5d2-isc.c
@@ -356,30 +356,26 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
struct device_node *epn = NULL;
struct isc_subdev_entity *subdev_entity;
unsigned int flags;
- int ret;
INIT_LIST_HEAD(&isc->subdev_entities);
- while (1) {
+ for_each_endpoint_of_node(np, epn) {
struct v4l2_fwnode_endpoint v4l2_epn = { .bus_type = 0 };
-
- epn = of_graph_get_next_endpoint(np, epn);
- if (!epn)
- return 0;
+ int ret;
ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
&v4l2_epn);
if (ret) {
- ret = -EINVAL;
+ of_node_put(epn);
dev_err(dev, "Could not parse the endpoint\n");
- break;
+ return -EINVAL;
}
subdev_entity = devm_kzalloc(dev, sizeof(*subdev_entity),
GFP_KERNEL);
if (!subdev_entity) {
- ret = -ENOMEM;
- break;
+ of_node_put(epn);
+ return -ENOMEM;
}
subdev_entity->epn = epn;
@@ -400,9 +396,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
list_add_tail(&subdev_entity->list, &isc->subdev_entities);
}
- of_node_put(epn);
- return ret;
+ return 0;
}
static int microchip_isc_probe(struct platform_device *pdev)
diff --git a/drivers/media/platform/microchip/microchip-sama7g5-isc.c b/drivers/media/platform/microchip/microchip-sama7g5-isc.c
index 73445f33d26b..36204fee10aa 100644
--- a/drivers/media/platform/microchip/microchip-sama7g5-isc.c
+++ b/drivers/media/platform/microchip/microchip-sama7g5-isc.c
@@ -339,33 +339,29 @@ static int xisc_parse_dt(struct device *dev, struct isc_device *isc)
struct device_node *epn = NULL;
struct isc_subdev_entity *subdev_entity;
unsigned int flags;
- int ret;
bool mipi_mode;
INIT_LIST_HEAD(&isc->subdev_entities);
mipi_mode = of_property_read_bool(np, "microchip,mipi-mode");
- while (1) {
+ for_each_endpoint_of_node(np, epn) {
struct v4l2_fwnode_endpoint v4l2_epn = { .bus_type = 0 };
-
- epn = of_graph_get_next_endpoint(np, epn);
- if (!epn)
- return 0;
+ int ret;
ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
&v4l2_epn);
if (ret) {
- ret = -EINVAL;
+ of_node_put(epn);
dev_err(dev, "Could not parse the endpoint\n");
- break;
+ return -EINVAL;
}
subdev_entity = devm_kzalloc(dev, sizeof(*subdev_entity),
GFP_KERNEL);
if (!subdev_entity) {
- ret = -ENOMEM;
- break;
+ of_node_put(epn);
+ return -ENOMEM;
}
subdev_entity->epn = epn;
@@ -389,9 +385,8 @@ static int xisc_parse_dt(struct device *dev, struct isc_device *isc)
list_add_tail(&subdev_entity->list, &isc->subdev_entities);
}
- of_node_put(epn);
- return ret;
+ return 0;
}
static int microchip_xisc_probe(struct platform_device *pdev)
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 4/8] media: platform: ti: use for_each_endpoint_of_node()
2024-04-01 0:01 [PATCH v2 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
` (2 preceding siblings ...)
2024-04-01 0:05 ` [PATCH v2 3/8] media: platform: microchip: " Kuninori Morimoto
@ 2024-04-01 0:05 ` Kuninori Morimoto
2024-04-01 0:06 ` [PATCH v2 5/8] media: platform: xilinx: " Kuninori Morimoto
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2024-04-01 0:05 UTC (permalink / raw)
To: Lad Prabhakar, Alexander Shishkin, Alexandre Belloni,
Claudiu Beznea, Daniel Vetter, David Airlie, Eugen Hristev,
Greg Kroah-Hartman, Helge Deller, Laurent Pinchart,
Maarten Lankhorst, Mauro Carvalho Chehab, Maxime Ripard,
Michal Simek, Nicolas Ferre, Rob Herring, Suzuki K Poulose,
Thomas Zimmermann, Tomi Valkeinen, coresight, dri-devel,
linux-arm-kernel, linux-fbdev, linux-media
We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/media/platform/ti/am437x/am437x-vpfe.c | 12 +++++-------
drivers/media/platform/ti/davinci/vpif_capture.c | 12 ++++++------
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.c b/drivers/media/platform/ti/am437x/am437x-vpfe.c
index 77e12457d149..009ff68a2b43 100644
--- a/drivers/media/platform/ti/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/ti/am437x/am437x-vpfe.c
@@ -2287,7 +2287,7 @@ static const struct v4l2_async_notifier_operations vpfe_async_ops = {
static struct vpfe_config *
vpfe_get_pdata(struct vpfe_device *vpfe)
{
- struct device_node *endpoint = NULL;
+ struct device_node *endpoint;
struct device *dev = vpfe->pdev;
struct vpfe_subdev_info *sdinfo;
struct vpfe_config *pdata;
@@ -2306,14 +2306,11 @@ vpfe_get_pdata(struct vpfe_device *vpfe)
if (!pdata)
return NULL;
- for (i = 0; ; i++) {
+ i = 0;
+ for_each_endpoint_of_node(dev->of_node, endpoint) {
struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 };
struct device_node *rem;
- endpoint = of_graph_get_next_endpoint(dev->of_node, endpoint);
- if (!endpoint)
- break;
-
sdinfo = &pdata->sub_devs[i];
sdinfo->grp_id = 0;
@@ -2371,9 +2368,10 @@ vpfe_get_pdata(struct vpfe_device *vpfe)
of_node_put(rem);
if (IS_ERR(pdata->asd[i]))
goto cleanup;
+
+ i++;
}
- of_node_put(endpoint);
return pdata;
cleanup:
diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c
index c31a5566fc5a..3db4e82c8a80 100644
--- a/drivers/media/platform/ti/davinci/vpif_capture.c
+++ b/drivers/media/platform/ti/davinci/vpif_capture.c
@@ -1517,16 +1517,12 @@ vpif_capture_get_pdata(struct platform_device *pdev,
if (!pdata->subdev_info)
return NULL;
- for (i = 0; i < VPIF_CAPTURE_NUM_CHANNELS; i++) {
+ i = 0;
+ for_each_endpoint_of_node(pdev->dev.of_node, endpoint) {
struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 };
unsigned int flags;
int err;
- endpoint = of_graph_get_next_endpoint(pdev->dev.of_node,
- endpoint);
- if (!endpoint)
- break;
-
rem = of_graph_get_remote_port_parent(endpoint);
if (!rem) {
dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
@@ -1577,6 +1573,10 @@ vpif_capture_get_pdata(struct platform_device *pdev,
goto err_cleanup;
of_node_put(rem);
+
+ i++;
+ if (i >= VPIF_CAPTURE_NUM_CHANNELS)
+ break;
}
done:
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 5/8] media: platform: xilinx: use for_each_endpoint_of_node()
2024-04-01 0:01 [PATCH v2 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
` (3 preceding siblings ...)
2024-04-01 0:05 ` [PATCH v2 4/8] media: platform: ti: " Kuninori Morimoto
@ 2024-04-01 0:06 ` Kuninori Morimoto
2024-04-01 0:06 ` [PATCH v2 6/8] staging: media: atmel: " Kuninori Morimoto
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2024-04-01 0:06 UTC (permalink / raw)
To: Lad Prabhakar, Alexander Shishkin, Alexandre Belloni,
Claudiu Beznea, Daniel Vetter, David Airlie, Eugen Hristev,
Greg Kroah-Hartman, Helge Deller, Laurent Pinchart,
Maarten Lankhorst, Mauro Carvalho Chehab, Maxime Ripard,
Michal Simek, Nicolas Ferre, Rob Herring, Suzuki K Poulose,
Thomas Zimmermann, Tomi Valkeinen, coresight, dri-devel,
linux-arm-kernel, linux-fbdev, linux-media
We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/media/platform/xilinx/xilinx-vipp.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
index 996684a73038..38818b82a575 100644
--- a/drivers/media/platform/xilinx/xilinx-vipp.c
+++ b/drivers/media/platform/xilinx/xilinx-vipp.c
@@ -205,12 +205,7 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
dev_dbg(xdev->dev, "creating links for DMA engines\n");
- while (1) {
- /* Get the next endpoint and parse its link. */
- ep = of_graph_get_next_endpoint(node, ep);
- if (ep == NULL)
- break;
-
+ for_each_endpoint_of_node(node, ep) {
dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 6/8] staging: media: atmel: use for_each_endpoint_of_node()
2024-04-01 0:01 [PATCH v2 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
` (4 preceding siblings ...)
2024-04-01 0:06 ` [PATCH v2 5/8] media: platform: xilinx: " Kuninori Morimoto
@ 2024-04-01 0:06 ` Kuninori Morimoto
2024-04-01 0:06 ` [PATCH v2 7/8] video: fbdev: " Kuninori Morimoto
2024-04-01 0:06 ` [PATCH v2 8/8] fbdev: omapfb: use of_graph_get_remote_port() Kuninori Morimoto
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2024-04-01 0:06 UTC (permalink / raw)
To: Lad Prabhakar, Alexander Shishkin, Alexandre Belloni,
Claudiu Beznea, Daniel Vetter, David Airlie, Eugen Hristev,
Greg Kroah-Hartman, Helge Deller, Laurent Pinchart,
Maarten Lankhorst, Mauro Carvalho Chehab, Maxime Ripard,
Michal Simek, Nicolas Ferre, Rob Herring, Suzuki K Poulose,
Thomas Zimmermann, Tomi Valkeinen, coresight, dri-devel,
linux-arm-kernel, linux-fbdev, linux-media
We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c | 6 +-----
drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c
index 31b2b48085c5..cbfbec0c6cb5 100644
--- a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c
+++ b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c
@@ -340,13 +340,9 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
INIT_LIST_HEAD(&isc->subdev_entities);
- while (1) {
+ for_each_endpoint_of_node(np, epn) {
struct v4l2_fwnode_endpoint v4l2_epn = { .bus_type = 0 };
- epn = of_graph_get_next_endpoint(np, epn);
- if (!epn)
- return 0;
-
ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
&v4l2_epn);
if (ret) {
diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c
index 020034f631f5..7c477b1d3c48 100644
--- a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c
+++ b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c
@@ -326,13 +326,9 @@ static int xisc_parse_dt(struct device *dev, struct isc_device *isc)
mipi_mode = of_property_read_bool(np, "microchip,mipi-mode");
- while (1) {
+ for_each_endpoint_of_node(np, epn) {
struct v4l2_fwnode_endpoint v4l2_epn = { .bus_type = 0 };
- epn = of_graph_get_next_endpoint(np, epn);
- if (!epn)
- return 0;
-
ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
&v4l2_epn);
if (ret) {
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 7/8] video: fbdev: use for_each_endpoint_of_node()
2024-04-01 0:01 [PATCH v2 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
` (5 preceding siblings ...)
2024-04-01 0:06 ` [PATCH v2 6/8] staging: media: atmel: " Kuninori Morimoto
@ 2024-04-01 0:06 ` Kuninori Morimoto
2024-04-01 0:06 ` [PATCH v2 8/8] fbdev: omapfb: use of_graph_get_remote_port() Kuninori Morimoto
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2024-04-01 0:06 UTC (permalink / raw)
To: Lad Prabhakar, Alexander Shishkin, Alexandre Belloni,
Claudiu Beznea, Daniel Vetter, David Airlie, Eugen Hristev,
Greg Kroah-Hartman, Helge Deller, Laurent Pinchart,
Maarten Lankhorst, Mauro Carvalho Chehab, Maxime Ripard,
Michal Simek, Nicolas Ferre, Rob Herring, Suzuki K Poulose,
Thomas Zimmermann, Tomi Valkeinen, coresight, dri-devel,
linux-arm-kernel, linux-fbdev, linux-media
We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c b/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c
index 09f719af0d0c..d80720c84323 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c
@@ -149,8 +149,7 @@ static void __init omapdss_walk_device(struct device_node *node, bool root)
of_node_put(n);
- n = NULL;
- while ((n = of_graph_get_next_endpoint(node, n)) != NULL) {
+ for_each_endpoint_of_node(node, n) {
struct device_node *pn;
pn = of_graph_get_remote_port_parent(n);
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 8/8] fbdev: omapfb: use of_graph_get_remote_port()
2024-04-01 0:01 [PATCH v2 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
` (6 preceding siblings ...)
2024-04-01 0:06 ` [PATCH v2 7/8] video: fbdev: " Kuninori Morimoto
@ 2024-04-01 0:06 ` Kuninori Morimoto
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2024-04-01 0:06 UTC (permalink / raw)
To: Lad Prabhakar, Alexander Shishkin, Alexandre Belloni,
Claudiu Beznea, Daniel Vetter, David Airlie, Eugen Hristev,
Greg Kroah-Hartman, Helge Deller, Laurent Pinchart,
Maarten Lankhorst, Mauro Carvalho Chehab, Maxime Ripard,
Michal Simek, Nicolas Ferre, Rob Herring, Suzuki K Poulose,
Thomas Zimmermann, Tomi Valkeinen, coresight, dri-devel,
linux-arm-kernel, linux-fbdev, linux-media
We already have of_graph_get_remote_port(), Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
index 14965a3fd05b..4040e247e026 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
@@ -117,19 +117,6 @@ u32 dss_of_port_get_port_number(struct device_node *port)
return reg;
}
-static struct device_node *omapdss_of_get_remote_port(const struct device_node *node)
-{
- struct device_node *np;
-
- np = of_graph_get_remote_endpoint(node);
- if (!np)
- return NULL;
-
- np = of_get_next_parent(np);
-
- return np;
-}
-
struct omap_dss_device *
omapdss_of_find_source_for_first_ep(struct device_node *node)
{
@@ -141,7 +128,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node)
if (!ep)
return ERR_PTR(-EINVAL);
- src_port = omapdss_of_get_remote_port(ep);
+ src_port = of_graph_get_remote_port(ep);
if (!src_port) {
of_node_put(ep);
return ERR_PTR(-EINVAL);
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread