Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1013928pxb; Wed, 1 Sep 2021 15:18:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeJZ62Av6wlJ34e8/mEZ2IxGMMYJTxaGRWph9VMWZUCps8u/Odx5aR1vH38owZ1JxYC0sO X-Received: by 2002:a92:d60f:: with SMTP id w15mr1204149ilm.209.1630534694424; Wed, 01 Sep 2021 15:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630534694; cv=none; d=google.com; s=arc-20160816; b=gYTRVBZklxut6MnqQ4FjIixd3Ly+oqCvvV/a7i2cFyZlklEL6SOZs3hrA58gCHW55+ Hs4G8wiaT6r3HNC05m2D+8MgVFearfmCOOPm//cScSROQYTaNQJRWBOUD5zrALHKCUDq zBThJVBAi9B39q1vIYJvKUyALDyrgxc+kq0SN0yiP+JmV2lO3idB1HKe1uSF4mbcNVYi 6Liv/0zTfCadqObPRdS7Z1TQPvd/qJ6nSJJ/tLR57VbSsSFgl4cyW6hSN39yyTMmTztI 4wXVBQ8WrKdXg4TP+tmkuz74clOp1gwVlzgLcjUEGbkvh0goNDxDXbu3vzXJlyNB03Ea 8dYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:reply-to:references:cc:to:subject:dkim-signature; bh=ba92fnOi+ubBIUpJ0iGrXmERvjIxv/+rhnFfB1nBMeU=; b=PZjdMtRlfD5o9tJ1Hrfd6EWf4y4OOjFXS95Pj3xkpSU3kudi2BizZorh7IFIxNdBz1 utRkPXQfoOx4V1Pqevlp8ohTu7zrIt1l3kdNrHKuhR86erBWdYxdWzEwQ3Xi1BzkTdIV IxltK3mVUL+NUao+ta6yXe7ArQUREvaJnZ1blzeMbHWmyMh1Yx+HNe0HsnNWgyxWXlHK mZ/p9iavk3qjGxf1HRgQ9/JkBZ0jxRTKQ1V/Mc1ktCjIM3oq6frmHkMiK5BIVNCzqv0s 4hh42SBVsBLG5gbOuQjLIxCbIo4dHF/TD4h0raaTEbgUd6gMIwv0VgdwjizQBmstzNXY PUJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=GguQUHRQ; 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 y11si39151ilh.125.2021.09.01.15.18.00; Wed, 01 Sep 2021 15:18:14 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=GguQUHRQ; 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 S231997AbhIAOuf (ORCPT + 99 others); Wed, 1 Sep 2021 10:50:35 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:47826 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbhIAOue (ORCPT ); Wed, 1 Sep 2021 10:50:34 -0400 Received: from [192.168.0.20] (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9CD32559; Wed, 1 Sep 2021 16:49:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1630507775; bh=SzJdlaBw2o7qjms5gbWvAmffcgZIJGKBfa2wvQ36ybo=; h=Subject:To:Cc:References:Reply-To:From:Date:In-Reply-To:From; b=GguQUHRQF3m6G/R2aRSuo5pWJdzg7h85XeSNFzMO4vv722B3f1LfuB8b0uzuRPWLd 6Zsgl+AOXAU4lBAJj1Vxykgz/R5ioEk4Y87AbiIKhQ+YDecPCXzxfXODQe6dh6hD4G +DY1EqJcl8BcMkSIuq+Qfz4pLNGEYs9+eqkY6q0M= Subject: Re: [PATCH v4] media: rcar_drif: Make use of the helper function devm_platform_get_and_ioremap_resource() To: Cai Huoqing Cc: Fabrizio Castro , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210901114459.31493-1-caihuoqing@baidu.com> Reply-To: kieran.bingham+renesas@ideasonboard.com From: Kieran Bingham Organization: Ideas on Board Message-ID: <7c75aa3a-8b1f-2d63-4c30-2c638d60e2c6@ideasonboard.com> Date: Wed, 1 Sep 2021 15:49:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210901114459.31493-1-caihuoqing@baidu.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/09/2021 12:44, Cai Huoqing wrote: > Use the devm_platform_get_and_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately. > > Signed-off-by: Cai Huoqing Reviewed-by: Kieran Bingham > --- > v1->v2: > Use devm_platform_get_and_ioremap_resource() instead of > devm_platform_ioremap_resource(). > v2->v3: > Update commit message. > v3->v4: > Remove the change - "struct resource *res" > > drivers/media/platform/rcar_drif.c | 3 +-- > 1 file changed, 1 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c > index a505d991548b..e50673276d93 100644 > --- a/drivers/media/platform/rcar_drif.c > +++ b/drivers/media/platform/rcar_drif.c > @@ -1395,8 +1395,7 @@ static int rcar_drif_probe(struct platform_device *pdev) > } > > /* Register map */ > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - ch->base = devm_ioremap_resource(&pdev->dev, res); > + ch->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(ch->base)) > return PTR_ERR(ch->base); > >