Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp536019pxb; Wed, 1 Sep 2021 04:46:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9EPuhhhohjhTIjkl/HxEwMgEuQBj3PcqjrDV9ijz/w+c1HflfFEscRJ4isv4uJ0RwfaqL X-Received: by 2002:a17:906:5384:: with SMTP id g4mr36672058ejo.27.1630496791191; Wed, 01 Sep 2021 04:46:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630496791; cv=none; d=google.com; s=arc-20160816; b=H2sSV9bI7Rmv1CYQBgUN6hpfENiapX6xyZoJs3Y7qGkLJdQU53Rgm0AgzqVuyOVODx MG/J1fXC6d+j23j61WDZz5siYnRglWneHOsKr6z0otV8JrwcB80yzoylvHZHILKQuZVO VTAjYjMpTXzk9rfRm5+/HFoKdnLmR4bFGscjKKmfqLo7Idoc3toW/GlFKGpZThl35ICG gGGEKn9yuyWsPqbsIHi56ci1TGESWFFLHB9jpWZa2T+QpsIvG9kjUnhtlwJ55BCpHw+/ ZRrTxS/62wb40i0HyoiVx1MMjU5WTq/V2Cgz+6BOkUXuUp8xXSJiz4+ADOicmEtxvLdN SucQ== 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=IBNSMWgRoas+1e2SYAo4J7Btl9nh2sxo6MBPLHP3bqM=; b=0u+sIUAacr99xpEqiWNSYHQfWxE91wuP+vQua85xlqIjT/PKA1j78ROdH+sxEWAEBb H4eJqS3o9oa+Sqoc3mId0NmRAUuG9F5k8KLOObmpdHGRdtQwBMiS1hYcaRyz46JmbRO7 8cVuF3o6D4/cdFziQA+Oul9QAToUBsRQO3POkV8q9aqZucjsuTBFDhhMVOxo8+2xYerG PZsUDR2zkfbUz6BsYHNaMeHFBukuy6xubWBx4GQ/JECF5m3UIxS64yJtzIeedpSPnW+S +fqVtnrEBJQlltp2ySdGILepe94aL22ZbM51n10MRi1fMceFfBX7Xhs+C1RQYB1+K7RC qfng== 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.45.53; Wed, 01 Sep 2021 04:46:31 -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 S243809AbhIALjj (ORCPT + 99 others); Wed, 1 Sep 2021 07:39:39 -0400 Received: from mx21.baidu.com ([220.181.3.85]:37262 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243543AbhIALjj (ORCPT ); Wed, 1 Sep 2021 07:39:39 -0400 Received: from BC-Mail-Ex17.internal.baidu.com (unknown [172.31.51.11]) by Forcepoint Email with ESMTPS id DA4574A7C94E65D6871F; Wed, 1 Sep 2021 19:38:40 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex17.internal.baidu.com (172.31.51.11) 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:38:40 +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:38:40 +0800 From: Cai Huoqing To: CC: Fabrizio Castro , Mauro Carvalho Chehab , , , Subject: [PATCH v3] media: rcar_drif: Make use of the helper function devm_platform_get_and_ioremap_resource() Date: Wed, 1 Sep 2021 19:38:34 +0800 Message-ID: <20210901113834.31427-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-Ex21.internal.baidu.com (172.31.51.15) 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_get_and_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Signed-off-by: Cai Huoqing --- v1->v2: Use devm_platform_get_and_ioremap_resource() instead of devm_platform_ioremap_resource(). v2->v3: Update commit message. drivers/media/platform/rcar_drif.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c index a505d991548b..e50673276d93 100644 --- a/drivers/media/platform/rcar_drif.c +++ b/drivers/media/platform/rcar_drif.c @@ -1376,7 +1376,7 @@ static int rcar_drif_probe(struct platform_device *pdev) struct rcar_drif_sdr *sdr; struct device_node *np; struct rcar_drif *ch; - struct resource *res; + struct resource *res; int ret; /* Reserve memory for enabled channel */ @@ -1395,8 +1395,7 @@ static int rcar_drif_probe(struct platform_device *pdev) } /* Register map */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ch->base = devm_ioremap_resource(&pdev->dev, res); + ch->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ch->base)) return PTR_ERR(ch->base); -- 2.25.1