From patchwork Fri Aug 17 18:52:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatraman S X-Patchwork-Id: 1339381 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C1B7A3FC33 for ; Fri, 17 Aug 2012 18:53:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932463Ab2HQSxp (ORCPT ); Fri, 17 Aug 2012 14:53:45 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:55046 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932379Ab2HQSxn (ORCPT ); Fri, 17 Aug 2012 14:53:43 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q7HIrgvf028077; Fri, 17 Aug 2012 13:53:42 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7HIrg9m022959; Fri, 17 Aug 2012 13:53:42 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Fri, 17 Aug 2012 13:53:42 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7HIrgSq019674; Fri, 17 Aug 2012 13:53:42 -0500 Received: from localhost (h83-3.vpn.ti.com [172.24.83.3]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q7HIrdr11042; Fri, 17 Aug 2012 13:53:39 -0500 (CDT) From: Venkatraman S To: , CC: , , , Venkatraman S Subject: [PATCH 04/10] mmc: omap: fix mmc_omap_report_irq to use dev_dbg macros Date: Sat, 18 Aug 2012 00:22:24 +0530 Message-ID: <1345229550-8672-5-git-send-email-svenkatr@ti.com> X-Mailer: git-send-email 1.7.11.1.25.g0e18bef In-Reply-To: <1345229550-8672-1-git-send-email-svenkatr@ti.com> References: <1345229550-8672-1-git-send-email-svenkatr@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The function mmc_omap_report_irq uses raw printks and the actual output was disabled by a static variable. Make the function use dev_vdbg macro and use it under the standard CONFIG_MMC_DEBUG flag. Signed-off-by: Venkatraman S --- drivers/mmc/host/omap.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 0ec4e55..614f63c 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -679,22 +679,29 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write) } } -static inline void mmc_omap_report_irq(u16 status) +#ifdef CONFIG_MMC_DEBUG +static void mmc_omap_report_irq(struct mmc_omap_host *host, u16 status) { static const char *mmc_omap_status_bits[] = { "EOC", "CD", "CB", "BRS", "EOFB", "DTO", "DCRC", "CTO", "CCRC", "CRW", "AF", "AE", "OCRB", "CIRQ", "CERR" }; - int i, c = 0; + int i; + char res[64], *buf = res; + + buf += sprintf(buf, "MMC IRQ 0x%x:", status); for (i = 0; i < ARRAY_SIZE(mmc_omap_status_bits); i++) - if (status & (1 << i)) { - if (c) - printk(" "); - printk("%s", mmc_omap_status_bits[i]); - c++; - } + if (status & (1 << i)) + buf += sprintf(buf, " %s", mmc_omap_status_bits[i]); + dev_vdbg(mmc_dev(host->mmc), "%s\n", res); +} +#else +static void mmc_omap_report_irq(struct mmc_omap_host *host, u16 status) +{ } +#endif + static irqreturn_t mmc_omap_irq(int irq, void *dev_id) { @@ -728,12 +735,10 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) cmd = host->cmd->opcode; else cmd = -1; -#ifdef CONFIG_MMC_DEBUG dev_dbg(mmc_dev(host->mmc), "MMC IRQ %04x (CMD %d): ", status, cmd); - mmc_omap_report_irq(status); - printk("\n"); -#endif + mmc_omap_report_irq(host, status); + if (host->total_bytes_left) { if ((status & OMAP_MMC_STAT_A_FULL) || (status & OMAP_MMC_STAT_END_OF_DATA))