Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp607265ybi; Wed, 17 Jul 2019 02:03:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTA0zSBeoARFTEbKvKfbgrCeqRZhOTzYeATKh2a0UK8sjNO9dKAosWMI4FOS066Q7eSAiv X-Received: by 2002:a17:90a:35e6:: with SMTP id r93mr42938938pjb.20.1563354188714; Wed, 17 Jul 2019 02:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563354188; cv=none; d=google.com; s=arc-20160816; b=Ppu7HYpr9jp7LpteU5rXXc9iHLNvg+TgID83OOiggZ1gb8rZ5cJ4wz1at2TC62clJe MwJ7dVFtzt13/0F6lKfIfrb9s4NKEOMRm21Os7sv+yK56Mi2BDX6O7mRuzLvrrGl7mXs l1OCnpx2S6P1R4lHa/M8mcIFIosq2SAn/PKa72RzYAqGFsDJTYla+gQ7gzqv+P+GxrtQ Z8FmyHMynmsxt21BLRnkLRD4wsC5EFJPP5La6YZ74tf1RP0HUNq+V+WuKkTDYSkx43a0 /ZxVVsRfuKGT4yvJKvXfrr7ozl2btnwREODIQp4tw5uDVbTy+SsfhlbTvzhURxVjF389 9rXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=4TZni2yXwRABxLMN7oyNqgQAD4B988ws1eGpAAdfhog=; b=MiOuX2390/qwqwVu+iu3Js+k3Q3usk5LPxgR7tR4hF0vKjSZdkR9u0yyGkkWReaDtm MgPCGdEHaDKeSb5QUdPHS2p8MiTIt9d+zbZzkE7gOwvcYqEaajWE0REDD5ynqEuyezfb RMWk83REhZ3L2GIKXMRukGDSVTroSXPYtkkW/AmuNdptRRdyiymGsBBGtkUbbQ7Y+abq Z3B0pURllkuNhLqpZjplXPr7qqBmmbe3qZVXythBzoY5Gzq5QIkV8Fp/vZ3uUnFMNfhN FkYiibtyf8UmBh8xTHdhymKaXjs+VmOlIoJjWUuwar6dnqSFyhpNDLCBZwN5RYoYAjPk Qnrw== ARC-Authentication-Results: i=1; mx.google.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si23693750pfv.149.2019.07.17.02.02.51; Wed, 17 Jul 2019 02:03:08 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726063AbfGQJCY (ORCPT + 99 others); Wed, 17 Jul 2019 05:02:24 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49520 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725873AbfGQJCY (ORCPT ); Wed, 17 Jul 2019 05:02:24 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4D3741A0174; Wed, 17 Jul 2019 11:02:22 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 79D371A00FF; Wed, 17 Jul 2019 11:02:15 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id F0931402D5; Wed, 17 Jul 2019 17:02:06 +0800 (SGT) From: Anson.Huang@nxp.com To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linus.walleij@linaro.org, stefan.wahren@i2se.com, kstewart@linuxfoundation.org, tglx@linutronix.de, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] mmc: mxs: use devm_platform_ioremap_resource() to simplify code Date: Wed, 17 Jul 2019 16:52:59 +0800 Message-Id: <20190717085259.31235-1-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.9.5 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang --- drivers/mmc/host/mxs-mmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index b334e81..78e7e35 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -571,7 +571,6 @@ static int mxs_mmc_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct mxs_mmc_host *host; struct mmc_host *mmc; - struct resource *iores; int ret = 0, irq_err; struct regulator *reg_vmmc; struct mxs_ssp *ssp; @@ -587,8 +586,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) host = mmc_priv(mmc); ssp = &host->ssp; ssp->dev = &pdev->dev; - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ssp->base = devm_ioremap_resource(&pdev->dev, iores); + ssp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ssp->base)) { ret = PTR_ERR(ssp->base); goto out_mmc_free; -- 2.7.4