[U-Boot] [PATCH] Fix breakage after removing common.h from export.h
Stefano Babic
sbabic at denx.de
Fri Dec 9 11:23:40 CET 2011
commit 0910d0bcb85acdf09b9dfd8ded452367b540a4ad
Mike Partington <mparting at lexmark.com>
Date: Wed Oct 27 10:31:09 2010 +0000
Standalone Apps: Standalone apps should need only exports.h.
Modify exports.h to remove its dependencies on other files, thus
enabling standalone apps to require only exports.h from the U-Boot
source tree. This appears to be the intent based on the following
note: http://lists.denx.de/pipermail/u-boot/2010-January/067174.html
breaks all boards - the fact is that common.h is not included anymore
by exports.h, and this breaks the build of several file.
Signed-off-by: Stefano Babic <sbabic at denx.de>
CC: Wolfgang Denk <wd at denx.de>
CC: Albert Aribaud <albert.u.boot at aribaud.net>
---
include/_exports.h | 6 ------
include/common.h | 16 +---------------
lib/qsort.c | 2 ++
3 files changed, 3 insertions(+), 21 deletions(-)
diff --git a/include/_exports.h b/include/_exports.h
index 349a3c5..5efcad6 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -24,9 +24,3 @@ EXPORT_FUNC(simple_strtol)
EXPORT_FUNC(strcmp)
EXPORT_FUNC(i2c_write)
EXPORT_FUNC(i2c_read)
-EXPORT_FUNC(spi_init)
-EXPORT_FUNC(spi_setup_slave)
-EXPORT_FUNC(spi_free_slave)
-EXPORT_FUNC(spi_claim_bus)
-EXPORT_FUNC(spi_release_bus)
-EXPORT_FUNC(spi_xfer)
diff --git a/include/common.h b/include/common.h
index 05a658c..e265bd4 100644
--- a/include/common.h
+++ b/include/common.h
@@ -35,6 +35,7 @@ typedef volatile unsigned short vu_short;
typedef volatile unsigned char vu_char;
#include <config.h>
+#include <assert.h>
#include <asm-offsets.h>
#include <linux/bitops.h>
#include <linux/types.h>
@@ -136,21 +137,6 @@ typedef volatile unsigned char vu_char;
#define debug(fmt, args...) \
debug_cond(_DEBUG, fmt, ##args)
-/*
- * An assertion is run-time check done in debug mode only. If DEBUG is not
- * defined then it is skipped. If DEBUG is defined and the assertion fails,
- * then it calls panic*( which may or may not reset/halt U-Boot (see
- * CONFIG_PANIC_HANG), It is hoped that all failing assertions are found
- * before release, and after release it is hoped that they don't matter. But
- * in any case these failing assertions cannot be fixed with a reset (which
- * may just do the same assertion again).
- */
-void __assert_fail(const char *assertion, const char *file, unsigned line,
- const char *function);
-#define assert(x) \
- ({ if (!(x) && _DEBUG) \
- __assert_fail(#x, __FILE__, __LINE__, __func__); })
-
#define error(fmt, args...) do { \
printf("ERROR: " fmt "\nat %s:%d/%s()\n", \
##args, __FILE__, __LINE__, __func__); \
diff --git a/lib/qsort.c b/lib/qsort.c
index 86c392c..5291c8d 100644
--- a/lib/qsort.c
+++ b/lib/qsort.c
@@ -16,6 +16,8 @@
* bcc and gcc. */
#include <linux/types.h>
+#include <stdarg.h>
+#include <assert.h>
#include <exports.h>
void qsort(void *base,
--
1.7.5.4
More information about the U-Boot
mailing list