Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp339118pxb; Tue, 31 Aug 2021 23:27:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjlK13koGVtc/mcj0oy5HOKpgcBCJ6FiLr8n9bm+y9bW3A5PkdhE9ur1u5wncTzDpnBYPJ X-Received: by 2002:a05:6638:408b:: with SMTP id m11mr6586073jam.136.1630477651555; Tue, 31 Aug 2021 23:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630477651; cv=none; d=google.com; s=arc-20160816; b=ZOKRF+x+jDACmr21RIMzWPxKtM8YS8AKcSQW/wCcMGJrZvp/CIiXSB6C5fWXbeopca ZD8Px5VGXQ1h2Qc0bOLINplwDRgnYyqBqsszOvwx4xiKP5lWglRXqsW8T1rRmJX3BbUY gZxeVMYwIkrD9gxKweOsNldM4xq7BGvxdY49b3t3ByKjTRiMCh6HBFDLutELNcrB67H6 MHTkna4yP17V8S6B8cEOn72v8A1Qe88JpUziSxp7mCcAdu8Z9sAUK2mpMerCqFKUzQ0E ndFIhz3lYYuMdOWcj+5mQZ5WtWYlGMNhOVboumz2X5D9vEHVQyiW+pjl0Hu8lresik8o yR7A== 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=0vhDMc1s+9RQOwNYCgVKau4+7ii1/lHFEPKDsZHoC8Y=; b=ds8kTFbdQWusk20S7RT0ggyH9fWiJMWbM9iSyhJCJPBSomZDHEYpFjzkisKGBPZFGd wddyA75bBs399TisLZ/MMMYwpD9dBD2TOVgvKK21rcLYgutE0zEwnVgfZWYrwgutVA8X hUvzJmH4Dg7m5QSnWFs2oyYQFgoFnzWaTc4R7ZuVlZLfgOCOLNWKyiMXPTcq4DBpI2mS eBx/zfi/dPGgDSZAkgpYlo8jUuyppDmv9Mv92+L5I7a8IgxID+ltWAmHMVBDqVENpjHz IGGgCJbz50FDQvrfFGB0byBGdjN4y+fzvxl2bBiv/X93oF/QxdlnmgNl93sxWjldvx6N JnTA== 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 r6si20045805ilb.145.2021.08.31.23.27.20; Tue, 31 Aug 2021 23:27: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 S242328AbhIAF4j (ORCPT + 99 others); Wed, 1 Sep 2021 01:56:39 -0400 Received: from mx21.baidu.com ([220.181.3.85]:52492 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242346AbhIAF4h (ORCPT ); Wed, 1 Sep 2021 01:56:37 -0400 Received: from BC-Mail-Ex18.internal.baidu.com (unknown [172.31.51.12]) by Forcepoint Email with ESMTPS id E429D5185CF41109C31D; Wed, 1 Sep 2021 13:55:38 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex18.internal.baidu.com (172.31.51.12) 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:55:38 +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:55:38 +0800 From: Cai Huoqing To: CC: Mikhail Ulyanov , "Mauro Carvalho Chehab" , , Subject: [PATCH] media: rcar_jpu: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:55:32 +0800 Message-ID: <20210901055532.7429-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/rcar_jpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c index f57158bf2b11..56bb464629ed 100644 --- a/drivers/media/platform/rcar_jpu.c +++ b/drivers/media/platform/rcar_jpu.c @@ -1590,7 +1590,6 @@ MODULE_DEVICE_TABLE(of, jpu_dt_ids); static int jpu_probe(struct platform_device *pdev) { struct jpu *jpu; - struct resource *res; int ret; unsigned int i; @@ -1603,8 +1602,7 @@ static int jpu_probe(struct platform_device *pdev) jpu->dev = &pdev->dev; /* memory-mapped registers */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - jpu->regs = devm_ioremap_resource(&pdev->dev, res); + jpu->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(jpu->regs)) return PTR_ERR(jpu->regs); -- 2.25.1