From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C974C4320E for ; Wed, 1 Sep 2021 11:09:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19B0F60F4B for ; Wed, 1 Sep 2021 11:09:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242088AbhIALKw (ORCPT ); Wed, 1 Sep 2021 07:10:52 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:45438 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232095AbhIALIx (ORCPT ); Wed, 1 Sep 2021 07:08:53 -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 1671B3D7; Wed, 1 Sep 2021 13:07:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1630494475; bh=t3+akF/1OktgGWbEpyZiTnFe8I2naccDbiRpGqMi/+Y=; h=Subject:To:Cc:References:From:Reply-To:Date:In-Reply-To:From; b=mo2PGXkTOFQUc7xDNbYcoxvuQPp88vr0E+OXPddDYxL4eFsmlBDw46DwnpfspJJfz qv3Jsi0CwOZAGeNum/zs2c5jdu7yLl1q0kyVNb/MU0ywIf+APLq1tylfXmMT1ZTGdu zrIV5wCeQmX/SNs1fafKg5D7n/DS6SuVH4K9efos= Subject: Re: [PATCH] media: rcar-csi2: Make use of the helper function devm_platform_ioremap_resource() To: Cai Huoqing Cc: =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210901055510.7279-1-caihuoqing@baidu.com> From: Kieran Bingham Reply-To: kieran.bingham+renesas@ideasonboard.com Organization: Ideas on Board Message-ID: <91a4539d-0ebb-c24c-583f-e356d42c3ea8@ideasonboard.com> Date: Wed, 1 Sep 2021 12:07:52 +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: <20210901055510.7279-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-media@vger.kernel.org On 01/09/2021 06:55, Cai Huoqing wrote: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing Reviewed-by: Kieran Bingham > --- > drivers/media/platform/rcar-vin/rcar-csi2.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c > index 711b52ba42b5..a4952711b7b1 100644 > --- a/drivers/media/platform/rcar-vin/rcar-csi2.c > +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c > @@ -1238,11 +1238,9 @@ static const struct media_entity_operations rcar_csi2_entity_ops = { > static int rcsi2_probe_resources(struct rcar_csi2 *priv, > struct platform_device *pdev) > { > - struct resource *res; > int irq, ret; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - priv->base = devm_ioremap_resource(&pdev->dev, res); > + priv->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(priv->base)) > return PTR_ERR(priv->base); > >