Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp321040pxb; Tue, 31 Aug 2021 22:56:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZz9gJCqFqcnkNF7B74vyc99CZwGmteGUl7Fd7iOjbOxq52arhu+hPQZ7ifCac91CvV6zw X-Received: by 2002:a05:6402:3188:: with SMTP id di8mr23367289edb.300.1630475782942; Tue, 31 Aug 2021 22:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630475782; cv=none; d=google.com; s=arc-20160816; b=hadbUMPgsJp40u190EAx3DW2Wo2zec67w7iomrSMEM07njFy+B/US/2uTtqpVZOLIZ hgOhCJWtArkJVhN/gKr5d+qxVF7vgOP74mJfdUH7gMKzl2dsUsdFyCIbLhuoWZHczwTo rozmu8wxiGrsWqLgZLcKiZxR5of51l1e4Rx+gV6SqNhH6zdvOqYm6SGj71Be+Mb1Hatm ISouMT++eV6GPE3iI7F3WuPa0cFiim80OlyC9NoZH2w2DeqCOR0jUY28JEvyhDURYz6E 1o9yhzvgH69xN9DOLzp25XzYFhuml932FmqdWdaP7cR1AFPU3onh8CKk8M44lf1cTtSo +BfA== 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=wBz9RWgQhlDcdR69yMCM1FMgOhlKG9GQVSncg/9leeA=; b=v1U42+w34OCjq4VbBClQ4sJKc2u8gzI1gO5r4e+ofFYrgTOK0+zI1W2PR4HiD0qDgY Bst0+4lMIoXhte191XqMEOVP1d1hbToBSO+0A/q3l5IuVYQz52gZu6OO6QPUAlUlYkvW QQ8svyvmhn4Zv0E/iElhBbdaPh9VkR4Xdjbmig/PMnG68v4Lfm5zfakkMebIH+BR+QaK u6b1qlIyJdNhBj0mAI4BbgzWj8EODVm2iGPYf/mFgHRMaheaxPfnpkdR/B6cZcjOWUQW Rrl9yFbc3lVszj8uV+TBAsr40TTQLiMclSorOnt6fGE6+cIUlIe3TWQkP1y/9nY3oDfD Kf5g== 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 bo18si13733566edb.453.2021.08.31.22.56.00; Tue, 31 Aug 2021 22:56:22 -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 S242173AbhIAFzS (ORCPT + 99 others); Wed, 1 Sep 2021 01:55:18 -0400 Received: from mx21.baidu.com ([220.181.3.85]:50866 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242142AbhIAFzS (ORCPT ); Wed, 1 Sep 2021 01:55:18 -0400 Received: from BC-Mail-Ex30.internal.baidu.com (unknown [172.31.51.24]) by Forcepoint Email with ESMTPS id 1530ACC968E1FAB6A5D6; Wed, 1 Sep 2021 13:54:10 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex30.internal.baidu.com (172.31.51.24) 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:54:09 +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:54:09 +0800 From: Cai Huoqing To: CC: Mauro Carvalho Chehab , , Subject: [PATCH] media: mx2_emmaprp: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:54:03 +0800 Message-ID: <20210901055403.6929-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/mx2_emmaprp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c index 08a5473b5610..3ce84d0f078c 100644 --- a/drivers/media/platform/mx2_emmaprp.c +++ b/drivers/media/platform/mx2_emmaprp.c @@ -804,7 +804,6 @@ static int emmaprp_probe(struct platform_device *pdev) { struct emmaprp_dev *pcdev; struct video_device *vfd; - struct resource *res; int irq, ret; pcdev = devm_kzalloc(&pdev->dev, sizeof(*pcdev), GFP_KERNEL); @@ -822,8 +821,7 @@ static int emmaprp_probe(struct platform_device *pdev) if (IS_ERR(pcdev->clk_emma_ahb)) return PTR_ERR(pcdev->clk_emma_ahb); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pcdev->base_emma = devm_ioremap_resource(&pdev->dev, res); + pcdev->base_emma = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pcdev->base_emma)) return PTR_ERR(pcdev->base_emma); -- 2.25.1