mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 5/6] watchdog: add static inline no-ops if WD is disabled
Date: Wed,  6 May 2015 14:51:30 +0200	[thread overview]
Message-ID: <1430916691-12459-5-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1430916691-12459-1-git-send-email-mkl@pengutronix.de>

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 include/watchdog.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/watchdog.h b/include/watchdog.h
index 3e2d08e87645..7e37b7c22a8d 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -17,8 +17,25 @@ struct watchdog {
 	int (*set_timeout)(struct watchdog *, unsigned);
 };
 
+#ifdef CONFIG_WATCHDOG
 int watchdog_register(struct watchdog *);
 int watchdog_deregister(struct watchdog *);
 int watchdog_set_timeout(unsigned);
+#else
+static inline int watchdog_register(struct watchdog *w)
+{
+	return 0;
+}
+
+int watchdog_deregister(struct watchdog *w)
+{
+	return 0;
+}
+
+int watchdog_set_timeout(unsigned t)
+{
+	return 0;
+}
+#endif
 
 #endif /* INCLUDE_WATCHDOG_H */
-- 
2.1.4


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

  parent reply	other threads:[~2015-05-06 12:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 12:51 [PATCH 1/6] fdt: of_unflatten_dtb(): remove left over "root" argument from inline doc Marc Kleine-Budde
2015-05-06 12:51 ` [PATCH 2/6] state: documentation: add anchor so that state can be referenced later Marc Kleine-Budde
2015-05-06 12:51 ` [PATCH 3/6] state: state_uint32_create: use %u to print unsigned variable Marc Kleine-Budde
2015-05-06 12:51 ` [PATCH 4/6] state: state_new_from_fdt(): remove unused function Marc Kleine-Budde
2015-05-06 12:51 ` Marc Kleine-Budde [this message]
2015-05-06 12:51 ` [PATCH 6/6] startup: introduce postenvironment_initcall Marc Kleine-Budde
2015-05-07  7:15 ` [PATCH 1/6] fdt: of_unflatten_dtb(): remove left over "root" argument from inline doc 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=1430916691-12459-5-git-send-email-mkl@pengutronix.de \
    --to=mkl@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