[1/2] batman-adv: use original printk in bat_printk

Message ID 1265814507-29885-1-git-send-email-linus.luessing@web.de (mailing list archive)
State Accepted, archived
Commit ded252cfee3902830ad8f1bd404e98c80637ad31
Headers

Commit Message

Linus Lüssing Feb. 10, 2010, 3:08 p.m. UTC
  bat_printk is calling a printk which got previously
substituted because of the define in compat.h.
This patch removes the define for the scope of
bat_printk.c.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 bat_printk.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
  

Comments

Marek Lindner Feb. 13, 2010, 4:02 p.m. UTC | #1
On Wednesday 10 February 2010 23:08:27 Linus Lüssing wrote:
> Some missed debug output, removing it.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@web.de>
> Signed-off-by: Andrew Lunn <andrew@lunn.c

I applied both patches.

Thanks,
Marek
  

Patch

diff --git a/bat_printk.c b/bat_printk.c
index a55eff3..845391d 100644
--- a/bat_printk.c
+++ b/bat_printk.c
@@ -35,6 +35,12 @@ 
 /* Works only for digits and letters, but small and fast */
 #define TOLOWER(x) ((x) | 0x20)
 
+/* We don't want to recursively call bat_printk here
+   because of the previous define in compat.h */
+#ifdef printk
+#undef printk
+#endif
+
 static int skip_atoi(const char **s)
 {
 	int i = 0;