From patchwork Wed Oct 2 08:30:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 2973361 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 08CC09F88A for ; Wed, 2 Oct 2013 08:31:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA1D420204 for ; Wed, 2 Oct 2013 08:31:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E304201BE for ; Wed, 2 Oct 2013 08:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753365Ab3JBIbG (ORCPT ); Wed, 2 Oct 2013 04:31:06 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:63971 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753151Ab3JBIbF (ORCPT ); Wed, 2 Oct 2013 04:31:05 -0400 Received: by mail-la0-f44.google.com with SMTP id eo20so349553lab.3 for ; Wed, 02 Oct 2013 01:31:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wQBpIbCek6GoxZZv1m+rV2ynQj6jO3WJlflGI9R3LCo=; b=kqVD0w7UeZw9oJS3z8EaYVUJ3ZuWj4BviSvM+bnYeLb2bSTK1Uj8wcLEYwfXz/hEdF s5+w0QgkFZnrUL5FQzI3HYaxg9/dc85c5a2r9oKi3L027lXj5N+0MwNkuyyjYm8x0e90 kBPs/c/HQnMAqrgI0v5kENYoGlIYfosv/jmwVMzXT5wPhVnUT5/wEMk8GpEML4yPFh4P lKsqSBsVt5/57BXGL85BehkAcnjfAUCpcY5aJkjNk7ZtHwZ5UiIkfE4l6DD+qihuHKk+ l5zzi2nMXqekx0UD/i7+7J5Wx7vpJC5QhZroi1PNFt5UTUHkmk8F3e6r6Urvgz5St0bN MDPg== X-Gm-Message-State: ALoCoQlIYfGGMEC01/w40/WIezeArif1AraL+i8TcSq+Em9QiH7tfVUBzmWGCbYNh9yRVdaLuM7A X-Received: by 10.112.190.1 with SMTP id gm1mr880315lbc.30.1380702664135; Wed, 02 Oct 2013 01:31:04 -0700 (PDT) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id e4sm890041lba.15.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Oct 2013 01:31:03 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Chris Ball Cc: Ulf Hansson , Guennadi Liakhovetski Subject: [PATCH 3/7] mmc: sh_mmcif: Convert to clk_prepare|unprepare Date: Wed, 2 Oct 2013 10:30:47 +0200 Message-Id: <1380702651-13389-4-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380702651-13389-1-git-send-email-ulf.hansson@linaro.org> References: <1380702651-13389-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Previously only clk_enable|disable were being used. Adapt properly to the clock API, by also using clk_prepare|unprepare. Cc: Guennadi Liakhovetski Signed-off-by: Ulf Hansson --- drivers/mmc/host/sh_mmcif.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 32bc412..d032b08 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -964,7 +964,7 @@ static void sh_mmcif_request(struct mmc_host *mmc, struct mmc_request *mrq) static int sh_mmcif_clk_update(struct sh_mmcif_host *host) { - int ret = clk_enable(host->hclk); + int ret = clk_prepare_enable(host->hclk); if (!ret) { host->clk = clk_get_rate(host->hclk); @@ -1018,7 +1018,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) } if (host->power) { pm_runtime_put_sync(&host->pd->dev); - clk_disable(host->hclk); + clk_disable_unprepare(host->hclk); host->power = false; if (ios->power_mode == MMC_POWER_OFF) sh_mmcif_set_power(host, ios); @@ -1466,7 +1466,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) mutex_init(&host->thread_lock); - clk_disable(host->hclk); + clk_disable_unprepare(host->hclk); ret = mmc_add_host(mmc); if (ret < 0) goto emmcaddh; @@ -1487,7 +1487,7 @@ ereqirq1: ereqirq0: pm_runtime_suspend(&pdev->dev); eresume: - clk_disable(host->hclk); + clk_disable_unprepare(host->hclk); eclkupdate: clk_put(host->hclk); eclkget: @@ -1505,7 +1505,7 @@ static int sh_mmcif_remove(struct platform_device *pdev) int irq[2]; host->dying = true; - clk_enable(host->hclk); + clk_prepare_enable(host->hclk); pm_runtime_get_sync(&pdev->dev); dev_pm_qos_hide_latency_limit(&pdev->dev); @@ -1530,7 +1530,7 @@ static int sh_mmcif_remove(struct platform_device *pdev) if (irq[1] >= 0) free_irq(irq[1], host); - clk_disable(host->hclk); + clk_disable_unprepare(host->hclk); mmc_free_host(host->mmc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev);