* [PATCH] crypto: digest: provide static inline no-ops if digest is disabled
@ 2015-06-15 13:46 Marc Kleine-Budde
2015-06-17 5:58 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2015-06-15 13:46 UTC (permalink / raw)
To: barebox
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
include/digest.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/digest.h b/include/digest.h
index 7c6711b32a56..3a9d305963ef 100644
--- a/include/digest.h
+++ b/include/digest.h
@@ -59,6 +59,7 @@ struct digest {
/*
* digest functions
*/
+#ifdef CONFIG_DIGEST
int digest_algo_register(struct digest_algo *d);
void digest_algo_unregister(struct digest_algo *d);
void digest_algo_prints(const char *prefix);
@@ -76,6 +77,16 @@ int digest_file(struct digest *d, const char *filename,
int digest_file_by_name(const char *algo, const char *filename,
unsigned char *hash,
const unsigned char *sig);
+#else
+static inline struct digest *digest_alloc(const char *name)
+{
+ return NULL;
+}
+
+static inline void digest_free(struct digest *d)
+{
+}
+#endif
static inline int digest_init(struct digest *d)
{
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-17 5:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 13:46 [PATCH] crypto: digest: provide static inline no-ops if digest is disabled Marc Kleine-Budde
2015-06-17 5:58 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox