From patchwork Tue May 8 03:52:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh KUMAR X-Patchwork-Id: 157554 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 345B9B6FA7 for ; Tue, 8 May 2012 14:12:04 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752299Ab2EHEJh (ORCPT ); Tue, 8 May 2012 00:09:37 -0400 Received: from eu1sys200aog106.obsmtp.com ([207.126.144.121]:42419 "EHLO eu1sys200aog106.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750834Ab2EHEJg (ORCPT ); Tue, 8 May 2012 00:09:36 -0400 Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob106.postini.com ([207.126.147.11]) with SMTP ID DSNKT6icb9PTq1ByMLoOdBubiENtpYDCCa7E@postini.com; Tue, 08 May 2012 04:09:35 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 0B513C0; Tue, 8 May 2012 04:00:55 +0000 (GMT) Received: from Webmail-ap.st.com (eapex1hubcas4.st.com [10.80.176.69]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id D95EE124B; Tue, 8 May 2012 04:09:15 +0000 (GMT) Received: from localhost (10.199.82.235) by Webmail-ap.st.com (10.80.176.7) with Microsoft SMTP Server (TLS) id 8.3.192.1; Tue, 8 May 2012 12:09:05 +0800 From: Viresh Kumar To: Cc: , , , , , , , , , , , Viresh Kumar , Subject: [PATCH V3 Resend 07/12] ata/sata_mv: Remove conditional compilation of clk code Date: Tue, 8 May 2012 09:22:34 +0530 Message-ID: X-Mailer: git-send-email 1.7.9 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org With addition of dummy clk_*() calls for non CONFIG_HAVE_CLK cases in clk.h, there is no need to have clk code enclosed in #ifdef CONFIG_HAVE_CLK, #endif macros. Signed-off-by: Viresh Kumar Reviewed-by: Andrew Lunn Cc: Jeff Garzik Cc: linux-ide@vger.kernel.org --- drivers/ata/sata_mv.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 7336d4a..37503b8 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -551,9 +551,7 @@ struct mv_host_priv { u32 irq_mask_offset; u32 unmask_all_irqs; -#if defined(CONFIG_HAVE_CLK) struct clk *clk; -#endif /* * These consistent DMA memory pools give us guaranteed * alignment for hardware-accessed data structures, @@ -4063,13 +4061,11 @@ static int mv_platform_probe(struct platform_device *pdev) resource_size(res)); hpriv->base -= SATAHC0_REG_BASE; -#if defined(CONFIG_HAVE_CLK) hpriv->clk = clk_get(&pdev->dev, NULL); if (IS_ERR(hpriv->clk)) dev_notice(&pdev->dev, "cannot get clkdev\n"); else clk_enable(hpriv->clk); -#endif /* * (Re-)program MBUS remapping windows if we are asked to. @@ -4096,12 +4092,10 @@ static int mv_platform_probe(struct platform_device *pdev) return 0; err: -#if defined(CONFIG_HAVE_CLK) if (!IS_ERR(hpriv->clk)) { clk_disable(hpriv->clk); clk_put(hpriv->clk); } -#endif return rc; } @@ -4117,17 +4111,13 @@ err: static int __devexit mv_platform_remove(struct platform_device *pdev) { struct ata_host *host = platform_get_drvdata(pdev); -#if defined(CONFIG_HAVE_CLK) struct mv_host_priv *hpriv = host->private_data; -#endif ata_host_detach(host); -#if defined(CONFIG_HAVE_CLK) if (!IS_ERR(hpriv->clk)) { clk_disable(hpriv->clk); clk_put(hpriv->clk); } -#endif return 0; }