summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-08-25 17:58:39 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-08-28 13:33:42 +0200
commit06a912b046aa0661f6eae29ea26bc883d5d6041b (patch)
treea572ca2500902cb748d8c2c8a4d4edb0dade3c91
parente0c563bbf4df3da50d654eb744441f695ceffcac (diff)
downloadbarebox-06a912b046aa0661f6eae29ea26bc883d5d6041b.tar.gz
reset_source: fix ordering of exported functions
Declare and implement getters first, then setters. This syncs the order of functions in reset_source.c and reset_source.h. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/reset_source.c12
-rw-r--r--include/reset_source.h33
2 files changed, 25 insertions, 20 deletions
diff --git a/common/reset_source.c b/common/reset_source.c
index e24aa33..f400112 100644
--- a/common/reset_source.c
+++ b/common/reset_source.c
@@ -41,6 +41,12 @@ enum reset_src_type reset_source_get(void)
}
EXPORT_SYMBOL(reset_source_get);
+const char *reset_source_name(void)
+{
+ return reset_src_names[reset_source];
+}
+EXPORT_SYMBOL(reset_source_name);
+
int reset_source_get_instance(void)
{
return reset_source_instance;
@@ -61,12 +67,6 @@ void reset_source_set_priority(enum reset_src_type st, unsigned int priority)
}
EXPORT_SYMBOL(reset_source_set_priority);
-const char *reset_source_name(void)
-{
- return reset_src_names[reset_source];
-}
-EXPORT_SYMBOL(reset_source_name);
-
void reset_source_set_instance(enum reset_src_type type, int instance)
{
if (reset_source == type)
diff --git a/include/reset_source.h b/include/reset_source.h
index 2848a91..85329c8 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -26,25 +26,26 @@ enum reset_src_type {
};
#ifdef CONFIG_RESET_SOURCE
-void reset_source_set_priority(enum reset_src_type, unsigned int priority);
+
enum reset_src_type reset_source_get(void);
-void reset_source_set_instance(enum reset_src_type type, int instance);
+const char *reset_source_name(void);
int reset_source_get_instance(void);
+
+void reset_source_set_priority(enum reset_src_type, unsigned int priority);
+void reset_source_set_instance(enum reset_src_type type, int instance);
+
unsigned int of_get_reset_source_priority(struct device_node *node);
-const char *reset_source_name(void);
+
#else
-static inline void reset_source_set_priority(enum reset_src_type type,
- unsigned int priority)
-{
-}
-static inline void reset_source_set_instance(enum reset_src_type type, int instance)
+static inline enum reset_src_type reset_source_get(void)
{
+ return RESET_UKWN;
}
-static inline enum reset_src_type reset_source_get(void)
+static inline const char *reset_source_name(void)
{
- return RESET_UKWN;
+ return "unknown";
}
static inline int reset_source_get_instance(void)
@@ -52,14 +53,18 @@ static inline int reset_source_get_instance(void)
return -1;
}
-static inline unsigned int of_get_reset_source_priority(struct device_node *node)
+static inline void reset_source_set_priority(enum reset_src_type type,
+ unsigned int priority)
{
- return 0;
}
-static inline const char *reset_source_name(void)
+static inline void reset_source_set_instance(enum reset_src_type type, int instance)
{
- return "unknown";
+}
+
+static inline unsigned int of_get_reset_source_priority(struct device_node *node)
+{
+ return 0;
}
#endif