Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp306059pxb; Tue, 31 Aug 2021 22:29:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLSi0i17pwZCKVMJF/71Kyuod4tERNHdS8aLmcks66I1g1hokFemjyM/8cC6lk6oNMkkF0 X-Received: by 2002:a05:6e02:13f0:: with SMTP id w16mr22417706ilj.268.1630474148920; Tue, 31 Aug 2021 22:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630474148; cv=none; d=google.com; s=arc-20160816; b=Weevm6ZDIkE1jBXocn+GA8JqnNcpSw4zRQJuMMJo9ldKTX0IIfe9B0SlY9exrBYAc7 Ozr+gHkYB07ptF0gWHnL5MqknU8Mmp9jXonu1T0qtAt4LJdbCJffeYbOR5XwmRmTD2ir oSrkMX5Ha+6Mt3Vfq/yMFYB0liNegrScFVcDnaQyYOUv9tH6EcCt/e3Z17BAH4cLoMQ6 oi0JsMafYOg5kfpCzKITP4VtGP+uoKsXGoqkYAmrAbVtahZ/nCU25M3Gdl/dplc/RtDs o4HvnTPvvu7jGtXKBXEsfqQ8/nSxP+WwqftKEnmhqy6fVUUDe1xfGW7Q5T2PQe+98amO hCfw== 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=3hhCH6FP4K4wqD7GG0M0wgVnrLYyU8GCBiyQ0AnkTR4=; b=EEmvtWlJJmprh7O+jyfPPI3kakWOOHiyhD0XwzkeXMHgtj64VcI2EUKnsQwSDOAiVJ C0/4OAMaFnRNr9qB5vK1cA5uIpG6gYF/JDt9npmzI1CvhycGwI6vVHSjkb4Wy0D+WRB1 nq+tWefng8eXQLPiBtDe/aK47bsWoV/kdDKjks3mv4m/WkouGCdqWn6ZE21DFEuqbPc2 nMt3gbpJSYfgtODuY79TOI7hcNoil+9w2MzyzoZhhpG+piwfULqZjRVMtYJi4pepqlF4 tOl/+j02xZtBEybAYqV4gmM99sl7xxS0Y5jCqKpl18Q2kTvD4fC7hdxCGYmRPIMvvLrt z4Og== 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 r20si20448044jad.61.2021.08.31.22.28.57; Tue, 31 Aug 2021 22:29:08 -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 S241903AbhIAFPa (ORCPT + 99 others); Wed, 1 Sep 2021 01:15:30 -0400 Received: from mx20.baidu.com ([111.202.115.85]:42212 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229731AbhIAFP0 (ORCPT ); Wed, 1 Sep 2021 01:15:26 -0400 Received: from BC-Mail-Ex16.internal.baidu.com (unknown [172.31.51.56]) by Forcepoint Email with ESMTPS id 7D640F5D159825ACF693; Wed, 1 Sep 2021 13:14:28 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex16.internal.baidu.com (172.31.51.56) 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 13:14:28 +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:14:27 +0800 From: Cai Huoqing To: CC: Maxime Ripard , Mauro Carvalho Chehab , , Subject: [PATCH] media: cadence: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:14:20 +0800 Message-ID: <20210901051421.5372-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-Ex11.internal.baidu.com (172.31.51.51) 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/cadence/cdns-csi2rx.c | 4 +--- drivers/media/platform/cadence/cdns-csi2tx.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c index 7b44ab2b8c9a..cc3ebb0d96f6 100644 --- a/drivers/media/platform/cadence/cdns-csi2rx.c +++ b/drivers/media/platform/cadence/cdns-csi2rx.c @@ -279,13 +279,11 @@ static const struct v4l2_async_notifier_operations csi2rx_notifier_ops = { static int csi2rx_get_resources(struct csi2rx_priv *csi2rx, struct platform_device *pdev) { - struct resource *res; unsigned char i; u32 dev_cfg; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - csi2rx->base = devm_ioremap_resource(&pdev->dev, res); + csi2rx->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(csi2rx->base)) return PTR_ERR(csi2rx->base); diff --git a/drivers/media/platform/cadence/cdns-csi2tx.c b/drivers/media/platform/cadence/cdns-csi2tx.c index 5a67fba73ddd..8f8c36056354 100644 --- a/drivers/media/platform/cadence/cdns-csi2tx.c +++ b/drivers/media/platform/cadence/cdns-csi2tx.c @@ -433,13 +433,11 @@ static const struct v4l2_subdev_ops csi2tx_subdev_ops = { static int csi2tx_get_resources(struct csi2tx_priv *csi2tx, struct platform_device *pdev) { - struct resource *res; unsigned int i; u32 dev_cfg; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - csi2tx->base = devm_ioremap_resource(&pdev->dev, res); + csi2tx->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(csi2tx->base)) return PTR_ERR(csi2tx->base); -- 2.25.1