Message ID | 202302081659401393135@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3344079wrn; Wed, 8 Feb 2023 01:03:14 -0800 (PST) X-Google-Smtp-Source: AK7set/h7yl5OKaD95XpSNBILpy3btJ+xApRlmTr3LDWqCDG3iWEnEp5NvZVTeALPVH6bhF1Y04q X-Received: by 2002:a17:902:ecc4:b0:198:fef5:dcf1 with SMTP id a4-20020a170902ecc400b00198fef5dcf1mr7672460plh.26.1675846994152; Wed, 08 Feb 2023 01:03:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675846994; cv=none; d=google.com; s=arc-20160816; b=LBTaKDol8LgeRgNv8gCLnRGYyp7ZH7fDNsRHGZg4V2fobuaySk0k8A5oQ64o+zMmh2 ynTtVi5DmWmfgh2kxUDRP+H9NjKWwp6tN5GG2H2zI4iOZr1Fk4TcRzFiWGMlGgJVSiZc 0aPEGmDNHCN35Lgga5+UfKn2vrds2Atip+zN+s41uZs11r1+T2+7CnkqI9IVoRNUC0I3 rn/rbcO7xKt3AmfKu4ipcffqObkUMQAxRn958iDMugsIIHPps6a8Ql4O3RcQU4iOFwf7 DVc++/WEMNbr69gqQBdrkLGE6hKzYp/4fW3A/PVIihpoEduY3RM8cZM+kcznriYoR8xR 3uLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=PuvVjIstRtcReaAB7V8WvPZLy3P/CcqXwSwf5+1TUUg=; b=frU0jLuXhbjUJFfGw1E3lHMAVyH9mFPgYLBD0tNq0oQLmvdjQkch1oD4XMcuhNvr82 ZdV+zjJ9kZLvZ9QZXFOPTTlqSYtywHe+NS1nw4xOdRiFkP+JJyej2r1y6HFp8iPMUUlF N1mYWZ03uyg20x6XFJionyHYDso4tenCQH4KZWme7/xZS0ZysPyPr4b5clI2XhBfGHEu hwsJ2xpbs5e6ao2FMugbzmLHffLXPdY3gJyeDbulAXteIvBabrIYUOyufJysxPLMWv2a Qg0BQlrnuqbTr37jcb6mP2ZQo58MjMMO33HICR9WYJjUUWz17NWwELh7/VwDS/HWZh6p GUGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a1709028a8d00b001947e1a94d5si15857349plo.575.2023.02.08.01.03.00; Wed, 08 Feb 2023 01:03:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230141AbjBHI7w (ORCPT <rfc822;kmanaouilinux@gmail.com> + 99 others); Wed, 8 Feb 2023 03:59:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjBHI7u (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 8 Feb 2023 03:59:50 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFB86457CF; Wed, 8 Feb 2023 00:59:48 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4PBYpq1Pb3z8R042; Wed, 8 Feb 2023 16:59:47 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 3188xbRI044284; Wed, 8 Feb 2023 16:59:37 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 8 Feb 2023 16:59:40 +0800 (CST) Date: Wed, 8 Feb 2023 16:59:40 +0800 (CST) X-Zmail-TransId: 2af963e3647cffffffffca815e19 X-Mailer: Zmail v1.0 Message-ID: <202302081659401393135@zte.com.cn> Mime-Version: 1.0 From: <ye.xingchen@zte.com.cn> To: <niklas.soderlund@ragnatech.se> Cc: <mchehab@kernel.org>, <linux-media@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?q?=5BPATCH=5D_media=3A_platform=3A_renesas=3A_use=C2=A0devm?= =?utf-8?q?=5Fplatform=5Fget=5Fand=5Fioremap=5Fresource=28=29?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 3188xbRI044284 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63E36483.000 by FangMail milter! X-FangMail-Envelope: 1675846787/4PBYpq1Pb3z8R042/63E36483.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/<ye.xingchen@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E36483.000/4PBYpq1Pb3z8R042 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757252937901099884?= X-GMAIL-MSGID: =?utf-8?q?1757252937901099884?= |
Series |
media: platform: renesas: use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
ye.xingchen@zte.com.cn
Feb. 8, 2023, 8:59 a.m. UTC
From: Ye Xingchen <ye.xingchen@zte.com.cn> Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> --- drivers/media/platform/renesas/rcar-isp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Comments
On Wed, Feb 8, 2023 at 10:02 AM <ye.xingchen@zte.com.cn> wrote: > From: Ye Xingchen <ye.xingchen@zte.com.cn> > > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_get_and_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Ye, Thanks for your work. On 2023-02-08 16:59:40 +0800, ye.xingchen@zte.com.cn wrote: > From: Ye Xingchen <ye.xingchen@zte.com.cn> > > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_get_and_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > --- > drivers/media/platform/renesas/rcar-isp.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/media/platform/renesas/rcar-isp.c b/drivers/media/platform/renesas/rcar-isp.c > index 10b3474f93a4..a3cfd21f8aae 100644 > --- a/drivers/media/platform/renesas/rcar-isp.c > +++ b/drivers/media/platform/renesas/rcar-isp.c > @@ -419,10 +419,7 @@ static const struct media_entity_operations risp_entity_ops = { > static int risp_probe_resources(struct rcar_isp *isp, > struct platform_device *pdev) > { > - struct resource *res; > - > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - isp->base = devm_ioremap_resource(&pdev->dev, res); > + isp->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); > if (IS_ERR(isp->base)) > return PTR_ERR(isp->base); > > -- > 2.25.1
diff --git a/drivers/media/platform/renesas/rcar-isp.c b/drivers/media/platform/renesas/rcar-isp.c index 10b3474f93a4..a3cfd21f8aae 100644 --- a/drivers/media/platform/renesas/rcar-isp.c +++ b/drivers/media/platform/renesas/rcar-isp.c @@ -419,10 +419,7 @@ static const struct media_entity_operations risp_entity_ops = { static int risp_probe_resources(struct rcar_isp *isp, struct platform_device *pdev) { - struct resource *res; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - isp->base = devm_ioremap_resource(&pdev->dev, res); + isp->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(isp->base)) return PTR_ERR(isp->base);