mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/3] of: provide of_node_get and of_node_put stubs
Date: Fri,  9 Dec 2022 08:10:02 +0100	[thread overview]
Message-ID: <20221209071002.3765134-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20221209071002.3765134-1-a.fatoum@pengutronix.de>

While removal of of_node_get and of_node_put can simplify ported kernel
code, on the other hand, they can be more of a hassle with future syncs
of the driver. Just provide stubs for them, so they can be left in.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/of.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/of.h b/include/of.h
index 901101df051d..e1024e2c3ff8 100644
--- a/include/of.h
+++ b/include/of.h
@@ -101,6 +101,11 @@ static inline const void *of_property_get_value(const struct property *pp)
 	return pp->value ? pp->value : pp->value_const;
 }
 
+static inline struct device_node *of_node_get(struct device_node *node)
+{
+	return node;
+}
+static inline void of_node_put(struct device_node *node) { }
 
 void of_print_property(const void *data, int len);
 void of_print_cmdline(struct device_node *root);
-- 
2.30.2




  parent reply	other threads:[~2022-12-09  7:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09  7:10 [PATCH 1/3] driver: support Linux device/driver OF struct member names Ahmad Fatoum
2022-12-09  7:10 ` [PATCH 2/3] clk: add prepare/unprepare helpers Ahmad Fatoum
2022-12-16  6:38   ` Sascha Hauer
2022-12-09  7:10 ` Ahmad Fatoum [this message]
2022-12-09  9:19 ` [PATCH 1/3] driver: support Linux device/driver OF struct member names Marco Felsch

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=20221209071002.3765134-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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