From patchwork Tue Apr 26 16:25:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 733272 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3QGR8j6016509 for ; Tue, 26 Apr 2011 16:27:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757288Ab1DZQ0R (ORCPT ); Tue, 26 Apr 2011 12:26:17 -0400 Received: from 50.23.254.54-static.reverse.softlayer.com ([50.23.254.54]:46804 "EHLO softlayer.compulab.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757285Ab1DZQ0O (ORCPT ); Tue, 26 Apr 2011 12:26:14 -0400 Received: from [62.90.235.247] (port=39727 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.69) (envelope-from ) id 1QEl5W-0002Dc-JH; Tue, 26 Apr 2011 19:26:11 +0300 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 97E677E9445; Tue, 26 Apr 2011 19:26:09 +0300 (IDT) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cv4sp1Lq67KS; Tue, 26 Apr 2011 19:26:09 +0300 (IDT) Received: from grinberg-linux (grinberg-pc.compulab.local [10.1.1.13]) by zimbra-mta.compulab.co.il (Postfix) with SMTP id 768797E94D3; Tue, 26 Apr 2011 19:26:08 +0300 (IDT) Received: by grinberg-linux (sSMTP sendmail emulation); Tue, 26 Apr 2011 19:26:11 +0300 From: Igor Grinberg To: Tony Lindgren Cc: Mike Rapoport , Tim Nordell , Nishanth Menon , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Igor Grinberg Subject: [PATCH v2 2/2] arm: omap: gpmc-smsc911x: minor style fixes Date: Tue, 26 Apr 2011 19:25:56 +0300 Message-Id: <1303835156-14516-1-git-send-email-grinberg@compulab.co.il> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <4DB6E937.7090904@compulab.co.il> References: <4DB6E937.7090904@compulab.co.il> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 26 Apr 2011 16:27:09 +0000 (UTC) replace "printk(KERN_ERR" by "pr_err(" and fix needlessly multi-lined #ifdef Signed-off-by: Igor Grinberg Acked-by: Nishanth Menon --- v2: added pr_fmt so the pr_*() calls would be cleaner (thanks Nishanth) Nishanth, this time it does not affect the n-o-l, but it is indeed cleaner arch/arm/mach-omap2/gpmc-smsc911x.c | 14 +++++++------- arch/arm/plat-omap/include/plat/gpmc-smsc911x.h | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index d30293a..e09374a 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c @@ -10,6 +10,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#define pr_fmt(fmt) "%s: " fmt, __func__ #include #include @@ -55,7 +56,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) gpmc_cfg = board_data; if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { - printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n"); + pr_err("Failed to request GPMC mem region\n"); return; } @@ -63,8 +64,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) gpmc_smsc911x_resources[0].end = cs_mem_base + 0xff; if (gpio_request(gpmc_cfg->gpio_irq, "smsc911x irq") < 0) { - printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", - gpmc_cfg->gpio_irq); + pr_err("Failed to request IRQ GPIO%d\n", gpmc_cfg->gpio_irq); goto free1; } @@ -74,8 +74,8 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) if (gpio_is_valid(gpmc_cfg->gpio_reset)) { ret = gpio_request(gpmc_cfg->gpio_reset, "smsc911x reset"); if (ret) { - printk(KERN_ERR "Failed to request GPIO%d for smsc911x reset\n", - gpmc_cfg->gpio_reset); + pr_err("Failed to request reset GPIO%d\n", + gpmc_cfg->gpio_reset); goto free2; } @@ -92,7 +92,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources), &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config)); if (!pdev) { - printk(KERN_ERR "Unable to register smsc911x device\n"); + pr_err("Unable to register platform device\n"); gpio_free(gpmc_cfg->gpio_reset); goto free2; } @@ -104,5 +104,5 @@ free2: free1: gpmc_cs_free(gpmc_cfg->cs); - printk(KERN_ERR "Could not initialize smsc911x\n"); + pr_err("Could not initialize smsc911x device\n"); } diff --git a/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h b/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h index d3f1579..ea6c9c8 100644 --- a/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h +++ b/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h @@ -21,8 +21,7 @@ struct omap_smsc911x_platform_data { u32 flags; }; -#if defined(CONFIG_SMSC911X) || \ - defined(CONFIG_SMSC911X_MODULE) +#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) extern void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d);