From patchwork Wed Apr 20 02:16:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 66160 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2195211qge; Tue, 19 Apr 2016 19:16:27 -0700 (PDT) X-Received: by 10.66.251.10 with SMTP id zg10mr8738993pac.1.1461118586989; Tue, 19 Apr 2016 19:16:26 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si12271060paw.5.2016.04.19.19.16.26; Tue, 19 Apr 2016 19:16:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754373AbcDTCQM (ORCPT + 29 others); Tue, 19 Apr 2016 22:16:12 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:38436 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754307AbcDTCQC (ORCPT ); Tue, 19 Apr 2016 22:16:02 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id u3K2FZ7i005192; Wed, 20 Apr 2016 11:15:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com u3K2FZ7i005192 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1461118540; bh=wNaYjVSVT90fBc6WZ0J+TO/Lsc7C+zq6EkZGmG4ky3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=apmfDx8OlvsHTaM3YlkXkUw4C+g5VPNq8L4J5BtmCBCIVTdj1PUFol7UoU1dZS8YY p4l7+iimNnIu9bfJg5f1BvzY7hkKEkNtgwV0fKfrc7jMVZILlFRSnsf4BwgXFxBGmF 2D/E0oyBLRHCvK5yHz0Ylknfmry9lPAXwNquZn6r/vk9jpfzPBX9YjBZoHzKbxNgW6 oUjMdXSc/SItVv9HgWysYs+7KAM1A+qoGIZler7zLpJJaY0qLKhWG7hzwc8wWUKYRY dwveB2o5tmYrRvgcYUCRkRYF8Sx/pbe3kvoU40PoPNS4lVT0+UgeIecYKQ6Z1x48eN p0MkA0kpbZAtQ== 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 v2 4/7] mmc: sdhci-pltfm: use devm_ioremap() Date: Wed, 20 Apr 2016 11:16:28 +0900 Message-Id: <1461118591-21595-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461118591-21595-1-git-send-email-yamada.masahiro@socionext.com> References: <1461118591-21595-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the managed variant of ioremap(). Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/host/sdhci-pltfm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 8527a7c..5213287 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -160,7 +160,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; @@ -190,7 +191,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);