Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4511818pxb; Tue, 31 Aug 2021 07:01:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaNMl08pzQdvrxqsMrGixezmuQSPqE/yazcgF9FEZeCwTtl4LEU956DZItLFB1XraRD4k7 X-Received: by 2002:a92:6803:: with SMTP id d3mr19456170ilc.145.1630418472763; Tue, 31 Aug 2021 07:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630418472; cv=none; d=google.com; s=arc-20160816; b=bQ7KCzNmxNAKWqce6oKdyZFTK3aYwVN7R+DZKuCOzTbIrRQsPt0P27DjphHAyrZ8sH KfVEF6WWafU39+GZ2MnCe3SGTpXcI+yk/g3U7HID3jEv1rdK0M6AIFAi1lboPY9RQBYI CvCNC4UbGovE10gRSQheLgnRrT154vsz+X7LP01yX3Kg4NPhimF0lhqHpA/PIOIukrCO 5Yw1XkIrqTp618Gj7x/ZroezyzscpHrWGSpEDvYnbvjmyr9QunYTOBz7+zNik37Ejqs7 HjkKS0hn1Wncg+sGcr7F2azoKVHA7GglbBtyfeRfjiXzRercAz8L03C1bg1shtNHTvIt RieA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=/ce36vYBEathIO+mYs8ZNkmUNtBxn89ThEpGPqLBTgQ=; b=GikYuLLmG3MwJF+QRfy4CtIn6AVgQMno3aP1pUfkqUaPM6yeXTdbkvJm+szKi3tYhK KR3kdjyg6zAIqx0ynOgB2+S61Qr83+eIGEMMLFQz7spxqhpk+XdC4W6pwPHu2JvdAbez lL3OPRyeBO5/Ddp5ZIpOuHyGBLDDiFWwvvjO+Dwmw00aePtOrw8SLIhycnYE2wJDy34x mGIXVaNlC1x7b0aEPco6SlgNbri/pQoD7bHlcsab2RyNNsvWXPjLKSevgtCO10yBpbaD K3GxTKWm4C+IAPBdLEff1/+kSEkYVy15n+5ycl08VxXUu2eNxaUeugk54cyM962QrKj1 2VeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si18736042iow.65.2021.08.31.07.00.52; Tue, 31 Aug 2021 07:01:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234918AbhHaOAf (ORCPT + 99 others); Tue, 31 Aug 2021 10:00:35 -0400 Received: from mx20.baidu.com ([111.202.115.85]:34032 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232938AbhHaOAH (ORCPT ); Tue, 31 Aug 2021 10:00:07 -0400 Received: from BC-Mail-EX04.internal.baidu.com (unknown [172.31.51.44]) by Forcepoint Email with ESMTPS id 055F2D90E40D8E11FD39; Tue, 31 Aug 2021 21:59:10 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX04.internal.baidu.com (172.31.51.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Tue, 31 Aug 2021 21:59:09 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 31 Aug 2021 21:59:09 +0800 From: Cai Huoqing To: CC: Emma Anholt , Maxime Ripard , "David Airlie" , Daniel Vetter , , Subject: [PATCH] drm/vc4: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 31 Aug 2021 21:59:03 +0800 Message-ID: <20210831135903.4931-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex30.internal.baidu.com (172.31.51.24) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/gpu/drm/vc4/vc4_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index f6c16c5aee68..16abc3a3d601 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -50,13 +50,11 @@ #define DRIVER_PATCHLEVEL 0 /* Helper function for mapping the regs on a platform device. */ -void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index) +void __iomem *vc4_ioremap_regs(struct platform_device *pdev, int index) { - struct resource *res; void __iomem *map; - res = platform_get_resource(dev, IORESOURCE_MEM, index); - map = devm_ioremap_resource(&dev->dev, res); + map = devm_platform_ioremap_resource(pdev, index); if (IS_ERR(map)) return map; -- 2.25.1