Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp868867pxb; Wed, 1 Sep 2021 11:42:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNB4qjDVEjwg4QncNIkkupAMBmq1Hb1fICWs2NxNmz4ZX6mK6NzIXJWF2ftWBD7ZQIQGXv X-Received: by 2002:a05:6638:3284:: with SMTP id f4mr867282jav.67.1630521745063; Wed, 01 Sep 2021 11:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630521745; cv=none; d=google.com; s=arc-20160816; b=BYg4Z//j8KK4YyaoqmUrN7tsQsgYLrHyieHYQP3ylDW/0AVSvThph6p+SvH7Yp1Gip jV/1h1q4RH+G6di+0Wvs6gAJHBKWsg3dl59xmV8EGgtaQEoXOzYD0ZFNi9WCTRW6QkIu AGZg0ygF1hF4A3/+iaRfnvvtPV65PqrfEIRLVb595qINqdBbJ2ur9uUmYOy//JsK20VF R7usx6+HpJaDXmtesjf86RhZzqPNtmPtgLqgHjbt04m7YBPNzq9xix11Gq5dZ+xxI6Et tcGalSCC1MPcW4elgC+zftGi5Qa+7ipaFQuJT+pFDnxMEYQQvhbmypqvTb2AVKpFzKNi F+6g== 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=X52I7W1U0/3Ptch1KnLDsni0yKLtr7ISFjuWc1dTwxc=; b=yEzDSM3FE/3zlQ/XphbB+tZjpfYSzfuu0MqCOdyrrUiN5SP/mwctSMBP3m4ymGfBwv g3ky2MYJ0dfnMyE9K62LvEX63DHFRWesv+2mhfpf/0Z6N0HJQHaWvlNs4zrmF2+6eVYe TbGRNjDTWU/cH8Gzv+LmV998FLohGF8mrle+5/UOmJOQ3xWoZO8jjXCvIKRG25oUUoVn y8Bf1rhc6x7ga+9YrGUR8HRA9QSrs1F68Ce7ioa5Vnm8uYnww1bP2CZqai2lAtowT+re 3o0ycxyfJ02c5LtB/+4ds2mOAuoInpbjUHyBt7KEvL2hD8VeAcpYRB93JFEbEMnkLMYC 1OaA== 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 f7si375981ila.78.2021.09.01.11.42.13; Wed, 01 Sep 2021 11:42:25 -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 S242354AbhIAF4r (ORCPT + 99 others); Wed, 1 Sep 2021 01:56:47 -0400 Received: from mx20.baidu.com ([111.202.115.85]:52580 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242356AbhIAF4o (ORCPT ); Wed, 1 Sep 2021 01:56:44 -0400 Received: from BC-Mail-Ex17.internal.baidu.com (unknown [172.31.51.11]) by Forcepoint Email with ESMTPS id 42FB7C5C68C7906C6103; Wed, 1 Sep 2021 13:55:46 +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 13:55:46 +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:45 +0800 From: Cai Huoqing To: CC: Jacopo Mondi , Mauro Carvalho Chehab , , , Subject: [PATCH] media: renesas-ceu: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:55:39 +0800 Message-ID: <20210901055540.7479-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/renesas-ceu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/renesas-ceu.c b/drivers/media/platform/renesas-ceu.c index 9376eb363748..2e8dbacc414e 100644 --- a/drivers/media/platform/renesas-ceu.c +++ b/drivers/media/platform/renesas-ceu.c @@ -1628,7 +1628,6 @@ static int ceu_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; const struct ceu_data *ceu_data; struct ceu_device *ceudev; - struct resource *res; unsigned int irq; int num_subdevs; int ret; @@ -1644,8 +1643,7 @@ static int ceu_probe(struct platform_device *pdev) spin_lock_init(&ceudev->lock); mutex_init(&ceudev->mlock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ceudev->base = devm_ioremap_resource(dev, res); + ceudev->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ceudev->base)) { ret = PTR_ERR(ceudev->base); goto error_free_ceudev; -- 2.25.1