[PATCH] lib/atomic64_test: do not build on non-atomic64 systems

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Frysinger
Date: Saturday, October 16, 2010 - 10:27 am

If the arch doesn't provide atomic64 functionality (there are quite a
few), then don't bother trying to build this test.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 lib/atomic64_test.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
index 250ed11..0ac1a66 100644
--- a/lib/atomic64_test.c
+++ b/lib/atomic64_test.c
@@ -12,6 +12,8 @@
 #include <linux/kernel.h>
 #include <asm/atomic.h>
 
+#ifdef ATOMIC64_INIT
+
 #define INIT(c) do { atomic64_set(&v, c); r = c; } while (0)
 static __init int test_atomic64(void)
 {
@@ -164,3 +166,5 @@ static __init int test_atomic64(void)
 }
 
 core_initcall(test_atomic64);
+
+#endif
-- 
1.7.3.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] lib/atomic64_test: do not build on non-atomic64 sy ..., Mike Frysinger, (Sat Oct 16, 10:27 am)