mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Christian Eggers <ceggers@arri.de>
To: barebox@lists.infradead.org
Cc: Christian Eggers <ceggers@arri.de>, ceggers@gmx.de
Subject: [PATCH] param: Make enum param_tristate always visible
Date: Tue, 21 Jan 2020 11:45:27 +0100	[thread overview]
Message-ID: <20200121104527.14109-1-ceggers@arri.de> (raw)

When disabling CONFIG_SHELL_HUSH, also CONFIG_PARAMETER may be disabled.
In this case, the definition "enum param_tristate" is not reachable from
watchdog.h.

I also considered moving almost everything in watchdog.h inside the
CONFIG_WATCHDOG guard. But this doesn't work for me because
drivers/watchdog/imxwd.c can also be built without CONFIG_WATCHDOG.

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 @Sascha: I've asked my IT department to stop modifiying my patch
emails. I hope the mails are ok now.

 include/param.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/param.h b/include/param.h
index d75f50ea3..f1166eb28 100644
--- a/include/param.h
+++ b/include/param.h
@@ -37,6 +37,8 @@ struct param_d {
 	enum param_type type;
 };
 
+enum param_tristate { PARAM_TRISTATE_UNKNOWN, PARAM_TRISTATE_TRUE, PARAM_TRISTATE_FALSE };
+
 #ifdef CONFIG_PARAMETER
 const char *get_param_type(struct param_d *param);
 const char *dev_get_param(struct device_d *dev, const char *name);
@@ -63,8 +65,6 @@ struct param_d *dev_add_param_enum(struct device_d *dev, const char *name,
 		int (*get)(struct param_d *p, void *priv),
 		int *value, const char * const *names, int max, void *priv);
 
-enum param_tristate { PARAM_TRISTATE_UNKNOWN, PARAM_TRISTATE_TRUE, PARAM_TRISTATE_FALSE };
-
 struct param_d *dev_add_param_tristate(struct device_d *dev, const char *name,
 		int (*set)(struct param_d *p, void *priv),
 		int (*get)(struct param_d *p, void *priv),
-- 
2.16.4


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

             reply	other threads:[~2020-01-21 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 10:45 Christian Eggers [this message]
2020-01-22  8:03 ` 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=20200121104527.14109-1-ceggers@arri.de \
    --to=ceggers@arri.de \
    --cc=barebox@lists.infradead.org \
    --cc=ceggers@gmx.de \
    /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