mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] param: dev_add_param_mac() depends on CONFIG_NET
Date: Fri,  2 Oct 2015 14:35:01 +0200	[thread overview]
Message-ID: <1443789301-25097-1-git-send-email-mpa@pengutronix.de> (raw)

This patch adds the proper inline function for CONFIG_PARAMETER && !
CONFIG_NET.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 include/param.h | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/include/param.h b/include/param.h
index 3a851fc552a4..f8a2534ef3a8 100644
--- a/include/param.h
+++ b/include/param.h
@@ -63,10 +63,12 @@ struct param_d *dev_add_param_ip(struct device_d *dev, const char *name,
 		int (*get)(struct param_d *p, void *priv),
 		IPaddr_t *ip, void *priv);
 
+#ifdef CONFIG_NET
 struct param_d *dev_add_param_mac(struct device_d *dev, const char *name,
 		int (*set)(struct param_d *p, void *priv),
 		int (*get)(struct param_d *p, void *priv),
 		u8 *mac, void *priv);
+#endif
 
 int dev_add_param_fixed(struct device_d *dev, const char *name, const char *value);
 
@@ -154,14 +156,6 @@ static inline struct param_d *dev_add_param_ip(struct device_d *dev, const char
 	return ERR_PTR(-ENOSYS);
 }
 
-static inline struct param_d *dev_add_param_mac(struct device_d *dev, const char *name,
-		int (*set)(struct param_d *p, void *priv),
-		int (*get)(struct param_d *p, void *priv),
-		u8 *mac, void *priv)
-{
-	return ERR_PTR(-ENOSYS);
-}
-
 static inline int dev_add_param_fixed(struct device_d *dev, const char *name, const char *value)
 {
 	return 0;
@@ -178,4 +172,15 @@ static inline int dev_param_set_generic(struct device_d *dev, struct param_d *p,
 }
 #endif
 
+#if ! defined(CONFIG_PARAMETER) || ! defined(CONFIG_NET)
+static inline struct param_d *dev_add_param_mac(struct device_d *dev, const char *name,
+		int (*set)(struct param_d *p, void *priv),
+		int (*get)(struct param_d *p, void *priv),
+		u8 *mac, void *priv)
+{
+	return ERR_PTR(-ENOSYS);
+}
+
+#endif
+
 #endif /* PARAM_H */
-- 
2.6.0


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

             reply	other threads:[~2015-10-02 12:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 12:35 Markus Pargmann [this message]
2015-10-05  6:24 ` Sascha Hauer
2015-10-07  6:34 ` Sascha Hauer
2015-10-07 13:22   ` Markus Pargmann

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=1443789301-25097-1-git-send-email-mpa@pengutronix.de \
    --to=mpa@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