Message ID | 20230412064635.41315-3-yang.lee@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp125645vqo; Wed, 12 Apr 2023 00:13:38 -0700 (PDT) X-Google-Smtp-Source: AKy350aVl0PEheVtvVpXT2vpFp8bn7pc2a33+Sg/6zGFjWq5Dmaz29Vl6ngcuoFJFyfM3wLyJZaI X-Received: by 2002:a17:90a:d713:b0:246:d13c:c027 with SMTP id y19-20020a17090ad71300b00246d13cc027mr1664747pju.24.1681283617845; Wed, 12 Apr 2023 00:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681283617; cv=none; d=google.com; s=arc-20160816; b=NlQs3NjDG6dqru0CqT8RhBYrsJ/jVMHIkcHXQstqBNQid2Me2Ht4OLLT/lVMrae/Hu UZJiklYe0bYfzo9H+Hl6IZxbXZgQxZiu6kIQcC+2xqJoEcvy82lXhgbNpPTuDkHECkKV OyhVD6SGJU7RFOfIUIRC2XvT0YIyi2Z05hEjMxrFFX1XEGH9LOBQwFouI6JOFLzyIp0n 3URp5ZR9McIMpqXvCwaPMNMoaOG3E6LUi/cnecMlwv04dj1Wn1FnyCont/MGGj9TsUu1 +QtdH5XFCZ30B2Zj1Nqb/0w4Cb6X3OX1gibYrnCD2Ca5VFej7PnA6aq31LcPICmtkKaU ROvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MipIqH2CKFR/hCiI1VUJRpqj8gYm+TUS88mE55uA0A4=; b=Cx/RhRrSL5dUPp7GYeprjIaCKN/m7OQqjphMOLrRl+OoyQ/4kOQP4iK8+D+RJ0kduf 4QW7vFpQb5eV5l11c4uWxJMJHRQspy3qG08/TsOKT3Ncuq68FRxEH1QZ5YDPPsR015Jx 6j9vvpja6UqDS0z/P/dBWcEztbVtioql8ppaEry4IQtvUfQzaQ2DCIXStXXJJvZX34Gl Yb2F4V/28QZq9PDtqzP9OVr5LMi3RvkgdbWAk7mjOxPby9K1vFw+Xfx4i8dJm9Iwx4/5 P7WfU30wSeaYrc+oZgrmeRVhcTuTcTshmmNB81mgw2bYNsJSnkW3yMABWQ+TonZo48zZ x1/g== 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=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id na14-20020a17090b4c0e00b0023d2847e355si1435738pjb.0.2023.04.12.00.13.25; Wed, 12 Apr 2023 00:13:37 -0700 (PDT) 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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229820AbjDLGqx (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Wed, 12 Apr 2023 02:46:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbjDLGqq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Apr 2023 02:46:46 -0400 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 359865B82 for <linux-kernel@vger.kernel.org>; Tue, 11 Apr 2023 23:46:44 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Vfv9Pcb_1681281999; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vfv9Pcb_1681281999) by smtp.aliyun-inc.com; Wed, 12 Apr 2023 14:46:40 +0800 From: Yang Li <yang.lee@linux.alibaba.com> To: airlied@gmail.com Cc: daniel@ffwll.ch, matthias.bgg@gmail.com, chunkuang.hu@kernel.org, p.zabel@pengutronix.de, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Yang Li <yang.lee@linux.alibaba.com> Subject: [PATCH -next 3/3] drm/mediatek: Use devm_platform_ioremap_resource() Date: Wed, 12 Apr 2023 14:46:35 +0800 Message-Id: <20230412064635.41315-3-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c In-Reply-To: <20230412064635.41315-1-yang.lee@linux.alibaba.com> References: <20230412064635.41315-1-yang.lee@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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?1762952748170892340?= X-GMAIL-MSGID: =?utf-8?q?1762953650853365599?= |
Series |
[-next,1/3] drm/mediatek: Use devm_platform_ioremap_resource()
|
|
Commit Message
Yang Li
April 12, 2023, 6:46 a.m. UTC
Remove variable 'res' and convert platform_get_resource(),
devm_ioremap_resource() to a single call to
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On 12/04/2023 08:46, Yang Li wrote: > Remove variable 'res' and convert platform_get_resource(), > devm_ioremap_resource() to a single call to > devm_platform_ioremap_resource(), as this is exactly what this function > does. > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> > --- > drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c > index 1773379b2439..5cee84cce0be 100644 > --- a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c > @@ -159,7 +159,6 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct mtk_disp_ccorr *priv; > - struct resource *res; > int ret; > > priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > @@ -172,8 +171,7 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev) > return PTR_ERR(priv->clk); > } > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - priv->regs = devm_ioremap_resource(dev, res); > + priv->regs = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(priv->regs)) { > dev_err(dev, "failed to ioremap ccorr\n"); > return PTR_ERR(priv->regs);
On 12/04/2023 08:46, Yang Li wrote: > Remove variable 'res' and convert platform_get_resource(), > devm_ioremap_resource() to a single call to > devm_platform_ioremap_resource(), as this is exactly what this function > does. > > Signed-off-by: Yang Li<yang.lee@linux.alibaba.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Hi, Yang: Alexandre Mergnat <amergnat@baylibre.com> 於 2023年4月12日 週三 下午9:49寫道: > > On 12/04/2023 08:46, Yang Li wrote: > > Remove variable 'res' and convert platform_get_resource(), > > devm_ioremap_resource() to a single call to > > devm_platform_ioremap_resource(), as this is exactly what this function > > does. > > > > Signed-off-by: Yang Li<yang.lee@linux.alibaba.com> > > Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> > Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang. > -- > Regards, > Alexandre >
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c index 1773379b2439..5cee84cce0be 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c @@ -159,7 +159,6 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_disp_ccorr *priv; - struct resource *res; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -172,8 +171,7 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev) return PTR_ERR(priv->clk); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) { dev_err(dev, "failed to ioremap ccorr\n"); return PTR_ERR(priv->regs);