From patchwork Mon Jun 9 19:56:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 4323231 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B55FABEEAA for ; Mon, 9 Jun 2014 19:56:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0A0920204 for ; Mon, 9 Jun 2014 19:56:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 642FD201BB for ; Mon, 9 Jun 2014 19:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754050AbaFIT40 (ORCPT ); Mon, 9 Jun 2014 15:56:26 -0400 Received: from smtp10.smtpout.orange.fr ([80.12.242.132]:41877 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805AbaFIT40 (ORCPT ); Mon, 9 Jun 2014 15:56:26 -0400 Received: from beldin.home ([92.156.133.191]) by mwinf5d20 with ME id CKwQ1o00747vwpY03KwQce; Mon, 09 Jun 2014 21:56:25 +0200 X-ME-Helo: beldin.home X-ME-Date: Mon, 09 Jun 2014 21:56:25 +0200 X-ME-IP: 92.156.133.191 From: Robert Jarzmik To: Chris Ball , Ulf Hansson Cc: linux-mmc@vger.kernel.org, Robert Jarzmik Subject: [PATCH] mmc: pxamci: prepare and unprepare the clocks Date: Mon, 9 Jun 2014 21:56:14 +0200 Message-Id: <1402343774-1072-1-git-send-email-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.0.0.rc2 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.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 Add the clock prepare and unprepare call to the driver initialization phase. This will remove a warning once the PXA architecture is migrated to the clock infrastructure. Signed-off-by: Robert Jarzmik --- drivers/mmc/host/pxamci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 32fe113..f0f2074 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -681,6 +681,9 @@ static int pxamci_probe(struct platform_device *pdev) host->clk = NULL; goto out; } + ret = clk_prepare(host->clk); + if (ret) + goto out; host->clkrate = clk_get_rate(host->clk); @@ -820,8 +823,10 @@ err_gpio_ro: iounmap(host->base); if (host->sg_cpu) dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); - if (host->clk) + if (host->clk) { + clk_unprepare(host->clk); clk_put(host->clk); + } } if (mmc) mmc_free_host(mmc); @@ -871,6 +876,7 @@ static int pxamci_remove(struct platform_device *pdev) iounmap(host->base); dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); + clk_unprepare(host->clk); clk_put(host->clk); release_resource(host->res);