Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp298112pxb; Tue, 31 Aug 2021 22:14:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4xc5SYTPEoR/IdLjNnh4Q7cMnNzzsPqcy7JYUIzaq6hMApEaRDm6/dS4WefYEsxoYrtbO X-Received: by 2002:a17:906:4a82:: with SMTP id x2mr31438334eju.111.1630473294332; Tue, 31 Aug 2021 22:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630473294; cv=none; d=google.com; s=arc-20160816; b=yrrAzsOuvoxdQioF6lQV68v2q85Rpit917Jb/bc2M67XlIa2jUdSLJQZu/WJ/fox0W H/YZWPO8386bO/mbI1Zqr3to9S0xR9djbvHzyri0YafGdPnqCS3WuItiPyrlqGTgN9l6 NIdt83EKk5GSTcrPzzFL8Oy88n0eepPzepCS/mqDxbqrJ7+GIGTSR5ozURG/hto1q53U JK8rTgIvc0SeE38r7e93k1yvYDqf7SH2Fw+FWakiHiZ57v+6ot4mn8n9uPOBbUU5JfHG t5TINwC92E9bj973cy+VGYp3J37erk20bDRYsniEuIpFFZp/a/CfGo8IisqXQc04z+Cd PqgA== 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=ZfRalBdreJsVHaMtHoeQjlf4LSj+FvcYCPNuXnoa4C0=; b=PL7pqcfOKc6Hl8+n6gH9k6BQT019h2HzEjvLnydwrAjml2hOl8CGH6tEJd/u8cAnHI G+Ik/7fgECc2vQRMrJP/G6n350mLujRAjN90aTeQ68YddotiZtzLzFRVy8tRmHsoTy0m RYOwp3tC136cRLGLv3Ls0AmmEcpkmnT1+1bhrm14u/6V//uCsZg49RzqmKJjF11FYK0T +dolariSegPBihrwvfTsjWn3+1LFne1nLVgyj2hYtHTGV2qEopVvgLCrs7FEMIp9iri0 LNMwnTXfrGkpF2fCx48RT3wAageX+Oa+CGw7sZevGpe2xk+kPl+fbfdaaNyoGQ3CItY7 Y2kA== 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 b7si19570524edz.334.2021.08.31.22.14.08; Tue, 31 Aug 2021 22:14:54 -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 S241931AbhIAFKp (ORCPT + 99 others); Wed, 1 Sep 2021 01:10:45 -0400 Received: from mx20.baidu.com ([111.202.115.85]:38164 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230483AbhIAFKp (ORCPT ); Wed, 1 Sep 2021 01:10:45 -0400 Received: from BJHW-Mail-Ex11.internal.baidu.com (unknown [10.127.64.34]) by Forcepoint Email with ESMTPS id A8B943E761B4E2572B0B; Wed, 1 Sep 2021 13:09:46 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) 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:09:46 +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:09:46 +0800 From: Cai Huoqing To: CC: "Lad, Prabhakar" , Mauro Carvalho Chehab , , Subject: [PATCH] media: am437x: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:07:24 +0800 Message-ID: <20210901050725.5273-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-Ex18.internal.baidu.com (172.31.51.12) 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/am437x/am437x-vpfe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 48bb0c93729c..2dfae9bc0bba 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -2393,7 +2393,6 @@ static int vpfe_probe(struct platform_device *pdev) struct vpfe_config *vpfe_cfg; struct vpfe_device *vpfe; struct vpfe_ccdc *ccdc; - struct resource *res; int ret; vpfe = devm_kzalloc(&pdev->dev, sizeof(*vpfe), GFP_KERNEL); @@ -2411,8 +2410,7 @@ static int vpfe_probe(struct platform_device *pdev) vpfe->cfg = vpfe_cfg; ccdc = &vpfe->ccdc; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ccdc->ccdc_cfg.base_addr = devm_ioremap_resource(&pdev->dev, res); + ccdc->ccdc_cfg.base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ccdc->ccdc_cfg.base_addr)) { ret = PTR_ERR(ccdc->ccdc_cfg.base_addr); goto probe_out_cleanup; -- 2.25.1