Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp889562ybg; Fri, 18 Oct 2019 08:51:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyisJZd15kVG71Y3xzIZPgzhtRolACiHI4wYLvdpeThDlUD6x5+D1uJZ21eW+JP7o0xo03i X-Received: by 2002:a17:906:a2d1:: with SMTP id by17mr9442200ejb.206.1571413887012; Fri, 18 Oct 2019 08:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413887; cv=none; d=google.com; s=arc-20160816; b=nlscn3nszsajQtc223YNCR7PjVXpBeuNcjFX4YMbE7BP2eAsDxGF7oyxm+kjSAuHWX B6VzidNzLlwrsJB9Ta9U5vtqhy/7baAcaYIO0UJE3zziFIHZ3M1LsrX7zKSyc8wWV/jb Q0+Y2WYHjz7sGNqI7tQQXSuqbihqUmqSxJCYc/9laB3bZcf12wnZqYZPMc7Dpsjv8f2b 02w1zVpxtLAmh7JRoSKPfMcRU6bPd6okJ2lmd/+brxTfmCTC2LC9Vn4t8qMEDl9eXnRo pwEbpe520nR1BLAViAkRth7g3R6p+4aTZQ+oHcInHR4CAiDf956Lep5XELltWpvQcBBn ZxbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=IdHVhmH87qFP/oHpoLM5ktWPromWghuoonUKHuryOc0=; b=IxMC4PP2tpepScfwboCu6BKeLlgJszW8HfLIC4HlrrGpgIhPC54aHKDTqn5cGUNDB5 HhxyzrVLZ24juypaUydIzAkcShLm+rXAQT43AjpyzL6zpC/Vq2BcMgP7rrSUoPSiKwdL XSnTz4c4aTMf9mVOy9nS3zOyqr7hsrfm+SKKGUwmTkFn9l+6sjyV1Dhic0yTf7d9j4Zo Up9AdDfs+4if+C+WD3mOXZ10bxumDINHxeXL5L3XOY+lMDIcvd9fHlPdVjUaBmB+ZTQE 7lVLwRcxftvWBMtAriVmb5JpNYSGK6u81bPMD2Pvt0iZOafQgBV+6CcePjkhVTmS70So hRBw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y54si4464829edb.217.2019.10.18.08.51.04; Fri, 18 Oct 2019 08:51: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; 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 S2502924AbfJQMt5 (ORCPT + 99 others); Thu, 17 Oct 2019 08:49:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4212 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2502791AbfJQMtJ (ORCPT ); Thu, 17 Oct 2019 08:49:09 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id F08C7C3E838AE4F9EC76; Thu, 17 Oct 2019 20:49:06 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Thu, 17 Oct 2019 20:48:58 +0800 From: YueHaibing To: , , , , , , , , , , , , CC: , , , , , , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 23/30] pinctrl: rza2: use devm_platform_ioremap_resource() to simplify code Date: Thu, 17 Oct 2019 20:26:33 +0800 Message-ID: <20191017122640.22976-24-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20191017122640.22976-1-yuehaibing@huawei.com> References: <20191017122640.22976-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/pinctrl/pinctrl-rza2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rza2.c b/drivers/pinctrl/pinctrl-rza2.c index 3be1d83..e27ed2f 100644 --- a/drivers/pinctrl/pinctrl-rza2.c +++ b/drivers/pinctrl/pinctrl-rza2.c @@ -462,7 +462,6 @@ static const struct pinmux_ops rza2_pinmux_ops = { static int rza2_pinctrl_probe(struct platform_device *pdev) { struct rza2_pinctrl_priv *priv; - struct resource *res; int ret; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); @@ -471,8 +470,7 @@ static int rza2_pinctrl_probe(struct platform_device *pdev) priv->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); -- 2.7.4