From: Maxime Ripard <maxime@cerno.tech>
To: "Rob Herring" <robh+dt@kernel.org>,
"Frank Rowand" <frowand.list@gmail.com>,
"Chen-Yu Tsai" <wens@csie.org>,
"Maxime Ripard" <maxime@cerno.tech>,
"Jernej Škrabec" <jernej.skrabec@gmail.com>,
"Daniel Vetter" <daniel.vetter@intel.com>,
"David Airlie" <airlied@linux.ie>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/7] of: Make of_graph_get_port_by_id take a const device_node
Date: Wed, 29 Sep 2021 10:42:28 +0200 [thread overview]
Message-ID: <20210929084234.1271915-2-maxime@cerno.tech> (raw)
In-Reply-To: <20210929084234.1271915-1-maxime@cerno.tech>
of_graph_get_port_by_id doesn't modify the device_node pointer it takes
as argument, so we can make it const.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/of/property.c | 2 +-
include/linux/of_graph.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 3fd74bb34819..739d5d1c8c3a 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -603,7 +603,7 @@ EXPORT_SYMBOL(of_graph_parse_endpoint);
* Return: A 'port' node pointer with refcount incremented. The caller
* has to use of_node_put() on it when done.
*/
-struct device_node *of_graph_get_port_by_id(struct device_node *parent, u32 id)
+struct device_node *of_graph_get_port_by_id(const struct device_node *parent, u32 id)
{
struct device_node *node, *port;
diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h
index 4d7756087b6b..87f3f4d0d0df 100644
--- a/include/linux/of_graph.h
+++ b/include/linux/of_graph.h
@@ -42,7 +42,7 @@ bool of_graph_is_present(const struct device_node *node);
int of_graph_parse_endpoint(const struct device_node *node,
struct of_endpoint *endpoint);
int of_graph_get_endpoint_count(const struct device_node *np);
-struct device_node *of_graph_get_port_by_id(struct device_node *node, u32 id);
+struct device_node *of_graph_get_port_by_id(const struct device_node *node, u32 id);
struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
struct device_node *previous);
struct device_node *of_graph_get_endpoint_by_regs(
@@ -74,7 +74,7 @@ static inline int of_graph_get_endpoint_count(const struct device_node *np)
}
static inline struct device_node *of_graph_get_port_by_id(
- struct device_node *node, u32 id)
+ const struct device_node *node, u32 id)
{
return NULL;
}
--
2.31.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-09-29 8:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 8:42 [PATCH v5 0/7] drm/sun4i: Add support for dual-link LVDS on the A20 Maxime Ripard
2021-09-29 8:42 ` Maxime Ripard [this message]
2021-10-19 12:02 ` [PATCH v5 1/7] of: Make of_graph_get_port_by_id take a const device_node Laurent Pinchart
2021-10-21 7:48 ` Maxime Ripard
2021-10-22 4:47 ` Laurent Pinchart
2021-09-29 8:42 ` [PATCH v5 2/7] drm/of: Change the prototype of drm_of_lvds_get_dual_link_pixel_order Maxime Ripard
2021-09-29 8:42 ` [PATCH v5 3/7] dt-bindings: display: sun4i: Add LVDS Dual-Link property Maxime Ripard
2021-10-22 6:51 ` Laurent Pinchart
2021-09-29 8:42 ` [PATCH v5 4/7] drm/sun4i: tcon: Refactor the LVDS and panel probing Maxime Ripard
2021-09-29 8:42 ` [PATCH v5 5/7] drm/sun4i: tcon: Support the LVDS Dual-Link Maxime Ripard
2021-09-29 8:42 ` [PATCH v5 6/7] drm/sun4i: tcon: Enable the A20 dual-link output Maxime Ripard
2021-09-29 8:42 ` [PATCH v5 7/7] [DO NOT MERGE] ARM: dts: sun7i: Enable LVDS Dual-Link on the Cubieboard Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210929084234.1271915-2-maxime@cerno.tech \
--to=maxime@cerno.tech \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frowand.list@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).