Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp528951pxb; Wed, 1 Sep 2021 04:35:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBkfQxgMzNglyfMvUdnkonwRNgwEoLxRhHLxENu4Jop4Tf2iutrSDtpgE3pxrRxg2qfZNS X-Received: by 2002:a17:906:c20d:: with SMTP id d13mr35695826ejz.259.1630496123644; Wed, 01 Sep 2021 04:35:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630496123; cv=none; d=google.com; s=arc-20160816; b=r7LR8raGzoCXum5ALASaE/N0QAzkB1JWN24HkqBANTJFRaXHpYlYjPgrfp01N5oG/Q dvPjW52HQVWPlXr2Z9KGY5Z9lSa9cdQpKBIH87f5W8nCkJS6FHDx5dWV/9XNCfwH3pgF OdWZYbYPASAzsiD7Ds8pplLQP7x+01aujmwikP8pp1frNa4DUblJBX5UxRc6T1ye1qQe Eix7EXwU5gzDuL4UAKSdAO9VpY99aNbu0mZU88KLleoOT7OvX/gHP02xcf4Q0aikPa5u D8b4kJAxXYfAiUH76N0WCNwKL5PUwBW/6RunPoA0azpfbjyVUASN1b7xhnL9Bmv8mqRj /xlw== 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=vhzIFCEI3omjHz4i1uDVuz96dbB51ZZX77B8jzm3rzU=; b=iHP6+mdakSqt8U98qAxBy6TaFWNI2f6qIDy0ZVQTLqyYdep4z+ah4anqkksCVQfWQT nRqI/19YY+Zcxw6apGcYQhUtaY4JDxcc7b0pDYlUg+cIv3Yx6t/HatVrEDQU6e6fg4qu oLzQz5l10tcgpF/en14H8E5QwD1C+flM0hW6PlglaUkbQpdUpCHdhI/igBJ82MF0FjUN B04UEkJqmo310hhJxpyF8oX0JIlkqrdfop2PNEfvHZwRAWWr5ftbF5AnrUIYz36dwSHC VhqbRMv7K73sSO86OFDD3Q4Z1PddtRMmCgRDbxRvsXDrvyFycdVq6xYpfJ0kohuUizBS rC1g== 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 c21si20118196edy.64.2021.09.01.04.34.20; Wed, 01 Sep 2021 04:35:23 -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 S242665AbhIALar (ORCPT + 99 others); Wed, 1 Sep 2021 07:30:47 -0400 Received: from mx21.baidu.com ([220.181.3.85]:57686 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238424AbhIALaq (ORCPT ); Wed, 1 Sep 2021 07:30:46 -0400 Received: from BC-Mail-Ex05.internal.baidu.com (unknown [172.31.51.45]) by Forcepoint Email with ESMTPS id E483F5B12BF9A6B11705; Wed, 1 Sep 2021 19:29:47 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex05.internal.baidu.com (172.31.51.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 1 Sep 2021 19:29:47 +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; Wed, 1 Sep 2021 19:29:47 +0800 From: Cai Huoqing To: CC: Emma Anholt , David Airlie , "Daniel Vetter" , , Subject: [PATCH] drm/v3d: Make use of the helper function devm_platform_ioremap_resource_byname() Date: Wed, 1 Sep 2021 19:29:40 +0800 Message-ID: <20210901112941.31320-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-Ex27.internal.baidu.com (172.31.51.21) 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_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/gpu/drm/v3d/v3d_drv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c index 9403c3b36aca..c1deab2cf38d 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.c +++ b/drivers/gpu/drm/v3d/v3d_drv.c @@ -206,10 +206,7 @@ MODULE_DEVICE_TABLE(of, v3d_of_match); static int map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name) { - struct resource *res = - platform_get_resource_byname(v3d_to_pdev(v3d), IORESOURCE_MEM, name); - - *regs = devm_ioremap_resource(v3d->drm.dev, res); + *regs = devm_platform_ioremap_resource_byname(v3d_to_pdev(v3d), name); return PTR_ERR_OR_ZERO(*regs); } -- 2.25.1