From patchwork Wed Apr 12 06:46:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 82280 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp118044vqo; Tue, 11 Apr 2023 23:59:17 -0700 (PDT) X-Google-Smtp-Source: AKy350bCZ2iezvAZebEI/UTK92Z+mNnIy8c4TNHswS9SJWNep6OlTmILFjJYvXTeZQF2ThX5SuT6 X-Received: by 2002:a17:907:36b:b0:930:8714:6739 with SMTP id rs11-20020a170907036b00b0093087146739mr5439103ejb.30.1681282757097; Tue, 11 Apr 2023 23:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681282757; cv=none; d=google.com; s=arc-20160816; b=c5OpeALH1JKL9Ti+7uZX1scpqDSy0g6L9k5bibjHWY8iB0dXgP44ylgbWwcDV/MHGZ Ws9LSHcvQbWkCj1b9dykxh2ChMm7/nKQcWCq9OJx3EcN5bxH5AVA5Q0VxSZWX1kxKf5M swFBJ6wI5T12/qwI6QwOmOJrJbPjJXTmg0TsbX+pnsQnhFAJiceIv6k314GfBImwE4r3 KTX8aZe9kJ6+h86CGhf0VAgE0CDZadModyXWvM3PGaPSppFeH+QJSp+RGRz9+Yiq2tpI DrzBEDZUt/QMMppRi9UAAC6UPYdU5pZuXeCIbKUYNBw6YnZzrJbYj+HpZvjyobGMxGyR xD7A== 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=dKrCLmlIffh71h58MgK0xR1wolinne9sXsC5EuDugW8=; b=mdZwmOkWQw3Iesi4+8WAOsaBrNdqBDK6UYGXS0pOD+BEhEK4iM1xP3IFOzavdPMiZ6 9MK5dRgA6Yf4e7Lvy/THXU9wWgSziIM1kCTI9q2nL1Ha23OdLvKWslFIHUwto1B3iRRj xS3U3odYiiS808pg5GBzms37Xdka/dCsAgdSQgqHtnP1bLAjCJaHiYkxl754TsRD6y4l daUpdf6fijkUHBCo9yKSABiQ26YE07Lpipqld9vlZYJeuWF3NcgqfzHRun9np6ghX7iA C93lKgdzsqCebMU9K49qIk8Nt4v0pKNP56K1Nplj5axpU1z7OvYozLc7cLWsx+/9IaT3 bkhg== 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 gt12-20020a170906f20c00b0094e14e00777si473473ejb.25.2023.04.11.23.58.52; Tue, 11 Apr 2023 23:59:17 -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 S229800AbjDLGqu (ORCPT + 99 others); Wed, 12 Apr 2023 02:46:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjDLGqq (ORCPT ); Wed, 12 Apr 2023 02:46:46 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4464D59D2 for ; Tue, 11 Apr 2023 23:46:42 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R951e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Vfv9Pbn_1681281998; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vfv9Pbn_1681281998) by smtp.aliyun-inc.com; Wed, 12 Apr 2023 14:46:38 +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 2/3] drm/mediatek: Use devm_platform_ioremap_resource() Date: Wed, 12 Apr 2023 14:46:34 +0800 Message-Id: <20230412064635.41315-2-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 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762952748170892340?= X-GMAIL-MSGID: =?utf-8?q?1762952748170892340?= 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 Reviewed-by: Matthias Brugger Reviewed-by: Alexandre Mergnat --- drivers/gpu/drm/mediatek/mtk_disp_aal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c b/drivers/gpu/drm/mediatek/mtk_disp_aal.c index 434e8a9ce8ab..391fa0ece22c 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c @@ -104,7 +104,6 @@ static int mtk_disp_aal_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_disp_aal *priv; - struct resource *res; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -117,8 +116,7 @@ static int mtk_disp_aal_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 aal\n"); return PTR_ERR(priv->regs);