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: 8830621 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 23A0FC0553 for ; Thu, 14 Apr 2016 02:32:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 458A020274 for ; Thu, 14 Apr 2016 02:32:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7325F2017E for ; Thu, 14 Apr 2016 02:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753868AbcDNCbo (ORCPT ); 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 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 --- 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 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);