Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp888651pxb; Wed, 1 Sep 2021 12:07:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygEBf3LDDBLrB/KlwJgJ74krrYhB3fspNywVraDRewCFyvh1Bv/sOoYfowk2XbSfiIJgwI X-Received: by 2002:a92:8702:: with SMTP id m2mr738462ild.250.1630523226671; Wed, 01 Sep 2021 12:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630523226; cv=none; d=google.com; s=arc-20160816; b=LlXO+6yUkjx6Di/+ro8NC5jfbNO+HoYGxAY+1kHdLCJbmAelFe75wDQbr4NrxqPExT QESPzVSmryuB1Rdpo6eLI8d7MSPJJhlGXvrp6U5xtzmUYXZyFKmYTRR+ZtdHAC9ORrO2 9MNYRv4lPXfA9sCJ4FgC+wi4M3JKUki8wxLg9Wpq30o1Py0n9COaKUcZS59KhyZshX8f T5QHyqg/MMzIjNOu9auA+/D1KxbqSoYLceNTCVAZNFkX+N5+K0ysHgMpAW3p+SNmAFjm DsaOIV8KDZmCK1dKiZxPzVv/xZxVVMuHb7I4IlpEsFSgz09ELQCRqWJ5FY8+V9qk1iG4 O3mQ== 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=WXGRQA+SJDPkqcXxGFXIe+KTuO2+NOadyl2XDMpNyYU=; b=j727odnpg+N8yY0siR2aTVJf/C6mjiX3Z9QPq/PPc64Ff3NvXH9UWfrsvF2ngNow3m BDB5sZvdjScfyj985SHNLeB6K5S5RRy7eOlKQNkvHab8GPvK3+86JgmQSa+VEQdQHZjW BcZ2mVX+uK8N5XydoQ/n7eSm6izc5UFaSTMBexCIxFvUQUoqK6B6U1C4gULeTzvA+jXD ZjMuG4lf0qGN8Kyh+6CJ+qQ6VphNmY6UQ6qaVmwzd6eUA9TBnXsIyXiTBry35uKe+6qR gxqCrlQOgascckfsi5iQ0973KI9PiL9ye1eGi+O+skeYCG8q9hJ4U7SPItxVhKUdGYSB P2tA== 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 d125si279679jab.83.2021.09.01.12.06.54; Wed, 01 Sep 2021 12:07:06 -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 S242307AbhIAF4y (ORCPT + 99 others); Wed, 1 Sep 2021 01:56:54 -0400 Received: from mx20.baidu.com ([111.202.115.85]:52764 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242256AbhIAF4v (ORCPT ); Wed, 1 Sep 2021 01:56:51 -0400 Received: from BJHW-Mail-Ex03.internal.baidu.com (unknown [10.127.64.13]) by Forcepoint Email with ESMTPS id C79E3E8C0E950F215937; Wed, 1 Sep 2021 13:55:53 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex03.internal.baidu.com (10.127.64.13) 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 13:55:53 +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 13:55:53 +0800 From: Cai Huoqing To: CC: Jacob Chen , Ezequiel Garcia , Mauro Carvalho Chehab , "Heiko Stuebner" , , , , Subject: [PATCH] media: rockchip: rga: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:55:46 +0800 Message-ID: <20210901055547.7529-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: BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) 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/media/platform/rockchip/rga/rga.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index 6759091b15e0..4de5e8d2b261 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -800,7 +800,6 @@ static int rga_probe(struct platform_device *pdev) { struct rockchip_rga *rga; struct video_device *vfd; - struct resource *res; int ret = 0; int irq; @@ -821,9 +820,7 @@ static int rga_probe(struct platform_device *pdev) pm_runtime_enable(rga->dev); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - rga->regs = devm_ioremap_resource(rga->dev, res); + rga->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rga->regs)) { ret = PTR_ERR(rga->regs); goto err_put_clk; -- 2.25.1