Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp538009rwl; Tue, 11 Apr 2023 23:57:03 -0700 (PDT) X-Google-Smtp-Source: AKy350YqXmTXRBX76BKCewENIknyeuPApeUt7v0DKslDDlwO2eiZ6+PV7E8tVu78jYNRreVaRPJn X-Received: by 2002:a17:906:14d6:b0:92f:fbac:69c4 with SMTP id y22-20020a17090614d600b0092ffbac69c4mr5141178ejc.56.1681282622736; Tue, 11 Apr 2023 23:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681282622; cv=none; d=google.com; s=arc-20160816; b=R1JANSzOwQB1kth0yo/UCAW49uZkkvTtlOrxATbIyXlgg6nRWHD8T7I09R3+tgHAWv UddmTK/rNidNrZ2mjWhXE5P7E+X2KV3UvI1lW/cMv0FY6AWQsc04SobkAq/eqHD4PcMa HRWniIGgpuLRwj06EKtpMVWLWhIfb8ixPcKgySH5V1y2Yi699JNGyI2iG6Xeg+P0QwVQ zHR3XLU9e9NpyFIhUmOPsrdiGUKK6BjpY1sWWAICVM/2DyHn5PfOGcA51A+qq5ZP9unM FYm40AMV46K+H/m8hx3cSai8XBjs20Y29kQFhadGXaRaTifIp+vLCr2PzwuZXy7E4Lcw v5uA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lo16-20020a170906fa1000b0094e4b064151si1325179ejb.980.2023.04.11.23.56.38; Tue, 11 Apr 2023 23:57:02 -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 S229813AbjDLGqt (ORCPT + 99 others); Wed, 12 Apr 2023 02:46:49 -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 Content-Transfer-Encoding: 8bit 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 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_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); -- 2.20.1.7.g153144c