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 --- diff --git a/batman-adv-kernelland/bat_printk.c b/batman-adv-kernelland/bat_printk.c index a55eff3..556620a 100644 --- a/batman-adv-kernelland/bat_printk.c +++ b/batman-adv-kernelland/bat_printk.c @@ -35,6 +35,13 @@ /* 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 +#define ___printk printk +#undef printk +#endif + static int skip_atoi(const char **s) { int i = 0; @@ -853,3 +860,8 @@ asmlinkage int bat_printk(const char *fmt, ...)
return printk("foo:%s", buf); } + +#ifdef ___printk +#define printk ___printk +#undef ___printk +#endif