Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp536337rwl; Tue, 11 Apr 2023 23:55:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YCNiNAn2KrCzCN6uH1JipcVIvb+ADo2NyK9ooeuABHWL6yyuhJW9XyvCDqDDj/YFXEpTlN X-Received: by 2002:a17:906:2acc:b0:947:40e6:fde3 with SMTP id m12-20020a1709062acc00b0094740e6fde3mr12176675eje.35.1681282513747; Tue, 11 Apr 2023 23:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681282513; cv=none; d=google.com; s=arc-20160816; b=MFRra2FjfvpcG19/IJ668fHR02ryZAAHNyZc9OTIcN9kwnedrTgBNQDYFrdJhMRhaP gKV+f+DB0q1qIrYu4rbxBgUNKnfrROoOkl9r/KH8HqWd3dl5ZxHpL3nSgj1k1xtjmFPh kqZewsW5Fxp4SFBUn2AGk4LuSbJUIgPV/V3e9u5Ot3lHQS1BUOB+Yt0KQhY1FP07tQFF hpENknDMHnm5gJBic970yI4TvUgXygx42+0jrxh7cjzCXYx0esNnRB2Ks1ib5L5nJbRM /0cTvEQEpuI22EsTpBBxUHjVMT8mcggwj6sfFtpyWR4EA9eHT8Nkytpu1mSpnyeEKL8U 2nmw== 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 :message-id:date:subject:cc:to:from; bh=3luzA3XwiYkWB5fJqDhFh8NGT45ZboOxe393Dof2dmQ=; b=XvEglbovCjHlvtIdaP7/taH2/wtoi3iiC1MUlGqdoJV6lXlotZnrhl+2bsBtp33wG+ 4oLR2RHbM3jrnqe6mEisSkfhBrt8Jg3YiioM57Sdtyg+LI2we1UCCZecTqpRrzb+ZZcP /71GPtekRQxV3mlNwfc4XOvwiW8ndbhx8m9e2YqoJG332LI7Stfi2EQscZEkbJi43LZL yrRYcGxibhT2ylqxHfdndnOc/frwtf/RC/Wrnkk2grS/Dd9iiIPFz7zim8x5DUkdTL4W cUoYjBMoXWu18BZTxqWBQftjj/bGnVQhvfSTeN9bKMEvYh3teRyhf1iEtvSvZ0o3EaNN yg4A== 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 gt12-20020a170906f20c00b0094e14e00777si473473ejb.25.2023.04.11.23.54.39; Tue, 11 Apr 2023 23:55:13 -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 S229450AbjDLGqr (ORCPT + 99 others); Wed, 12 Apr 2023 02:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229800AbjDLGqp (ORCPT ); Wed, 12 Apr 2023 02:46:45 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DA995BB6 for ; Tue, 11 Apr 2023 23:46:40 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R821e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Vfv7ahI_1681281995; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vfv7ahI_1681281995) by smtp.aliyun-inc.com; Wed, 12 Apr 2023 14:46:36 +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 1/3] drm/mediatek: Use devm_platform_ioremap_resource() Date: Wed, 12 Apr 2023 14:46:33 +0800 Message-Id: <20230412064635.41315-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c 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,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_cec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c b/drivers/gpu/drm/mediatek/mtk_cec.c index b640bc0559e7..03aae9f95606 100644 --- a/drivers/gpu/drm/mediatek/mtk_cec.c +++ b/drivers/gpu/drm/mediatek/mtk_cec.c @@ -185,7 +185,6 @@ static int mtk_cec_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_cec *cec; - struct resource *res; int ret; cec = devm_kzalloc(dev, sizeof(*cec), GFP_KERNEL); @@ -195,8 +194,7 @@ static int mtk_cec_probe(struct platform_device *pdev) platform_set_drvdata(pdev, cec); spin_lock_init(&cec->lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - cec->regs = devm_ioremap_resource(dev, res); + cec->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(cec->regs)) { ret = PTR_ERR(cec->regs); dev_err(dev, "Failed to ioremap cec: %d\n", ret); -- 2.20.1.7.g153144c