Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp320526pxb; Tue, 31 Aug 2021 22:55:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweQ4r9jW/Rd7mQslXceo5MXeqxRz2v44AHXC2Ta/prryz3oM4mDxzmFlrND4S/n9A1kNnr X-Received: by 2002:a17:906:ca1:: with SMTP id k1mr35550900ejh.369.1630475719484; Tue, 31 Aug 2021 22:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630475719; cv=none; d=google.com; s=arc-20160816; b=d92bItPn65gJYRu5Kb7K3NmOLZb8V2YtAvN4qJ1uHXQ0yreTTv6dl2Yu8OXc3ykh1f 8nNjHY/ttdLRdcIhfrb9jR2JsvXNh2FhUxH0nBWVW0R+kvd7OhBd6c4nepbDtq9Sucez 0eLFKMTPciLOmjLngRbhBwhSoWjlKsDmSZKTYwWOt19K/j36X0swGZU0Af9//4ungH40 G39nCBnfP15VfiYwAz/ERjcdC7PAYXv4/vL3FX13oR2y317hgni9V/UMwPszTH+Zv0PT DQm0zvKmJ+y0yGbb3SxqfNbksGIQiaiPWN1pqgH3liSemzaG1gjsQoHusQ1eul+Ivx63 kF2w== 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=l5KUhw3LnEMlCq2BQ8K13eptv+i5Z+HNryTzyitjUVc=; b=Bmhh62zyFlNWpXAGONoYvNDwF1C01MT/2ECEiS6ctuc2T9ueJEYOHvcID0gJ3TH1Gs ClpaNY4KYOjKv6r2RDFE8lOWKsMBVVUny/FzI8xAnO9OmRAyp9PG1Lj9yOHD1FH8x1/6 rRtfyqsM+WHM6A+2nLNP180cz3B5HzaaUUtMgviW+FoJg+3/SZxFHToKe0bW6yr/TVDf 46ljx14x6I1Q6P88LYkijbjJ8jmz6GnFUj1P6b1WJ1eYmHNCrtnuRZVGGi6tED0sSf9r pDmb8HyBCO/AVrPSVS60+GIl9Ja5ANZnlhkg/sJE3oVQ2hi23dSej8J2/qYHGZLg5QY6 jXzQ== 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 b11si19464556edr.415.2021.08.31.22.54.53; Tue, 31 Aug 2021 22:55:19 -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 S242256AbhIAFxC (ORCPT + 99 others); Wed, 1 Sep 2021 01:53:02 -0400 Received: from mx20.baidu.com ([111.202.115.85]:48632 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242255AbhIAFwy (ORCPT ); Wed, 1 Sep 2021 01:52:54 -0400 Received: from BC-Mail-EX08.internal.baidu.com (unknown [172.31.51.48]) by Forcepoint Email with ESMTPS id B5203435A3BABA66B017; Wed, 1 Sep 2021 13:51:53 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX08.internal.baidu.com (172.31.51.48) 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:51: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:51:52 +0800 From: Cai Huoqing To: CC: Philipp Zabel , Mauro Carvalho Chehab , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , , , Subject: [PATCH] media: imx-pxp: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:51:46 +0800 Message-ID: <20210901055147.6779-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/imx-pxp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/imx-pxp.c b/drivers/media/platform/imx-pxp.c index 4321edc0c23d..723b096fedd1 100644 --- a/drivers/media/platform/imx-pxp.c +++ b/drivers/media/platform/imx-pxp.c @@ -1636,7 +1636,6 @@ static int pxp_soft_reset(struct pxp_dev *dev) static int pxp_probe(struct platform_device *pdev) { struct pxp_dev *dev; - struct resource *res; struct video_device *vfd; int irq; int ret; @@ -1652,8 +1651,7 @@ static int pxp_probe(struct platform_device *pdev) return ret; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dev->mmio = devm_ioremap_resource(&pdev->dev, res); + dev->mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dev->mmio)) return PTR_ERR(dev->mmio); -- 2.25.1