From patchwork Thu Apr 14 02:29:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 65775 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp347727qge; Wed, 13 Apr 2016 19:32:03 -0700 (PDT) X-Received: by 10.66.102.104 with SMTP id fn8mr17734189pab.129.1460601123751; Wed, 13 Apr 2016 19:32:03 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r65si4575405pfi.101.2016.04.13.19.32.03; Wed, 13 Apr 2016 19:32:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753868AbcDNCbo (ORCPT + 2 others); Wed, 13 Apr 2016 22:31:44 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:40557 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753555AbcDNC3a (ORCPT ); Wed, 13 Apr 2016 22:29:30 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id u3E2Sr3f010961; Thu, 14 Apr 2016 11:28:57 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u3E2Sr3f010961 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1460600937; bh=5KV2ToGOqX2+XqNshMTT+9PyASAJ6/FzehIxO9g1YzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qym4J8I4OkFpohetKTJxG/nHcXyu2PlJ3XEDbdUrrzVomjTgExCdt+u7K5almWsUr d+QqGgq9J6dXAeSXO6aSBujDzpTJxo4P5l6YOoPenhSOSLLjOF69OWcEcpnK1EiY1X T8AajhVl3LOWZ7p5NrTEXyHS7ziGfcTisuy6SAQ/oXgW4kK/SDWLKMPDAAkTlZtsQ/ oObg8ARdv66UxJ4A8AvOZqNRlcNpj0hnkBR20X4PrgGTDLxY9Ub2dki6mfmYDHi6Ot BpxRyDaSxfD+NuuYsnqOFbYLnMkmTOzcrA3te932ILMKToWIP19hYhM1ahB104x5TB T2xussAFVgI6w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mmc@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org, Adrian Hunter , Ulf Hansson Subject: [PATCH 4/7] mmc: sdhci-pltfm: use devm_ioremap() Date: Thu, 14 Apr 2016 11:29:47 +0900 Message-Id: <1460600990-10993-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460600990-10993-1-git-send-email-yamada.masahiro@socionext.com> References: <1460600990-10993-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Use the managed variant of ioremap(). Signed-off-by: Masahiro Yamada --- drivers/mmc/host/sdhci-pltfm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index e4da44a..c81a72d 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -166,7 +166,8 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, goto err_request; } - host->ioaddr = ioremap(iomem->start, resource_size(iomem)); + host->ioaddr = devm_ioremap(&pdev->dev, iomem->start, + resource_size(iomem)); if (!host->ioaddr) { dev_err(&pdev->dev, "failed to remap registers\n"); ret = -ENOMEM; @@ -196,7 +197,6 @@ void sdhci_pltfm_free(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); - iounmap(host->ioaddr); sdhci_free_host(host); } EXPORT_SYMBOL_GPL(sdhci_pltfm_free);