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: 8885231 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E9E87BF29F for ; Wed, 20 Apr 2016 02:17:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 225CF20251 for ; Wed, 20 Apr 2016 02:17:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DD1B2015E for ; Wed, 20 Apr 2016 02:17:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754505AbcDTCQI (ORCPT ); Tue, 19 Apr 2016 22:16:08 -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-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 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(-) 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);