Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp538873rwl; Tue, 11 Apr 2023 23:58:07 -0700 (PDT) X-Google-Smtp-Source: AKy350Z/U4TcdVWhhGmwQo+/xecj0RET0B1Md9h9zAiqlw9PwWICJ0Qp2VoLSI+E3ljiMbCxPufz X-Received: by 2002:a05:6402:c5:b0:504:923f:e657 with SMTP id i5-20020a05640200c500b00504923fe657mr11953298edu.35.1681282687530; Tue, 11 Apr 2023 23:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681282687; cv=none; d=google.com; s=arc-20160816; b=vVGSxqq11yMM0CPCb+uGt4K86Y3/zhGYwCyulYObnWnIHENkLImsSEHG/sL5z6KmHT +YaUPoQOAMHa7EH/eY4PI4ekAiUKaMUJQNZaTZzcUCiCNeCnvuhbhCh4g/N5e64YM+3I 8KoaTnTEvKpGcai0xYYwWIsmo+fRAoGIs1o899/lmAcF+AHgVgj2teoIyUoq8AjCwy7T XtfKmL/LosUHQZ8Pzv/9xKx4JlzJPyTb848khpfRsIDstYkhMfjFsMu4BmyP0KjX8j3X MPQDlMg8s+x0+lbVbKk4MFIjKplgB3Ar41uG0vTYiL0fuXXE7cVHcANxFGjAtRBK9pgT C2Pg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x19-20020aa7d393000000b004ad03d31db6si2224397edq.278.2023.04.11.23.57.43; Tue, 11 Apr 2023 23:58:07 -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 S229818AbjDLGqw (ORCPT + 99 others); Wed, 12 Apr 2023 02:46:52 -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 ); 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 ; 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 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.20.1.7.g153144c