From patchwork Wed Feb 10 02:36:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 29 Return-Path: Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by open-mesh.net (Postfix) with ESMTP id C81E51541ED for ; Wed, 10 Feb 2010 03:57:20 +0100 (CET) Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate03.web.de (Postfix) with ESMTP id 0E27313D6F966 for ; Wed, 10 Feb 2010 03:36:43 +0100 (CET) Received: from [85.179.239.125] (helo=localhost) by smtp05.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.110 #314) id 1Nf2RW-00025f-00 for b.a.t.m.a.n@lists.open-mesh.org; Wed, 10 Feb 2010 03:36:42 +0100 Date: Wed, 10 Feb 2010 03:36:41 +0100 From: Linus =?utf-8?Q?L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Message-ID: <20100210023641.GA2112@Linus-Debian> References: <20100208205602.GA9369@Sellars> <20100208213212.GA9389@Sellars> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100208213212.GA9389@Sellars> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linus.luessing@web.de X-Sender: linus.luessing@web.de X-Provags-ID: V01U2FsdGVkX18+d0b6Swc9I2mbu/GAqA3VuF30Jf3eFWLDuqXx 9NA7A1fZ7is0ILk5DX3X8rzcoiNpmXCsjo51CVtQYuJ2QbgsMQ 3qvDROoIuZ4LdBRQXO+A== Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: use original printk in bat_printk X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 02:57:20 -0000 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 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