mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: barebox@lists.infradead.org
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [PATCH] common: reset_source: Remove of_get_reset_source_priority()
Date: Wed,  8 Jun 2022 08:12:44 +0300	[thread overview]
Message-ID: <20220608051244.2318-1-eagle.alexander923@gmail.com> (raw)

of_get_reset_source_priority() has no users,
so it can be safely removed.

Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
 common/reset_source.c  | 20 +++-----------------
 include/reset_source.h |  7 -------
 2 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/common/reset_source.c b/common/reset_source.c
index 3554cbd0fb..dccb683231 100644
--- a/common/reset_source.c
+++ b/common/reset_source.c
@@ -76,7 +76,9 @@ EXPORT_SYMBOL(reset_source_set_prinst);
 
 void reset_source_set_device(struct device_d *dev, enum reset_src_type st)
 {
-	int priority = of_get_reset_source_priority(dev->device_node);
+	unsigned int priority = RESET_SOURCE_DEFAULT_PRIORITY;
+
+	of_property_read_u32(node, "reset-source-priority", &priority);
 
 	__reset_source_set(dev, st, priority, -1);
 }
@@ -92,19 +94,3 @@ static int reset_source_init(void)
 	return 0;
 }
 coredevice_initcall(reset_source_init);
-
-/**
- * of_get_reset_source_priority() - get the desired reset source priority from
- *                                  device tree
- * @node:	The device_node to read the property from
- *
- * return: The priority
- */
-unsigned int of_get_reset_source_priority(struct device_node *node)
-{
-	unsigned int priority = RESET_SOURCE_DEFAULT_PRIORITY;
-
-	of_property_read_u32(node, "reset-source-priority", &priority);
-
-	return priority;
-}
diff --git a/include/reset_source.h b/include/reset_source.h
index 023b1fe4a0..a98c61ae0e 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -32,8 +32,6 @@ void reset_source_set_device(struct device_d *dev, enum reset_src_type st);
 void reset_source_set_prinst(enum reset_src_type,
 			     unsigned int priority, int instance);
 
-unsigned int of_get_reset_source_priority(struct device_node *node);
-
 #else
 
 static inline enum reset_src_type reset_source_get(void)
@@ -69,11 +67,6 @@ static inline void reset_source_set_prinst(enum reset_src_type type,
 static inline void reset_source_set_instance(enum reset_src_type type, int instance)
 {
 }
-
-static inline unsigned int of_get_reset_source_priority(struct device_node *node)
-{
-	return 0;
-}
 #endif
 
 #define RESET_SOURCE_DEFAULT_PRIORITY 100
-- 
2.32.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


             reply	other threads:[~2022-06-08  5:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08  5:12 Alexander Shiyan [this message]
2022-06-09  7:32 ` Sascha Hauer
2022-06-09  7:38   ` Alexander Shiyan
2022-06-09  8:40     ` Sascha Hauer
2022-06-09 20:07 ` Michael Riesch
2022-06-10  5:07   ` Alexander Shiyan
2022-06-10  7:32     ` Sascha Hauer

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=20220608051244.2318-1-eagle.alexander923@gmail.com \
    --to=eagle.alexander923@gmail.com \
    --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