From patchwork Wed Apr 12 06:46:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 82281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp122725vqo; Wed, 12 Apr 2023 00:07:47 -0700 (PDT) X-Google-Smtp-Source: AKy350YgN83u7uREVnd+lkKKex6M9HjrAd6wboqyX8bVmQ7suXrLHQsccnJAfZ1lnd3PrS3quRiV X-Received: by 2002:a05:6a20:671d:b0:da:3bce:75e2 with SMTP id q29-20020a056a20671d00b000da3bce75e2mr4928813pzh.2.1681283267633; Wed, 12 Apr 2023 00:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681283267; cv=none; d=google.com; s=arc-20160816; b=yoh/D4VwjfNICRRahCu89ACjxgkBqBSnu4sEwnt9coQKvgwffJnO44VtPK857rDNB5 pcKsSwI4vEyaU/AiFsZ/7wM6jVJrKuGYjBT1Xv14POoaDzG7LABKZYCnmAXDxC8u9Frw J17KMaw9J5+OogDdQK2mRkwnFDByvUIZMBNnveS42Q50FpZ3f0VnW0RKMjP+KOKeRUVZ 2TBhaKdSqscf2Lvd+fghzhW1pmDPqyh2vqkCYqGBQwUz/KB83x3L55XgysSk3RQBMUd/ 7OnetRQMAi+UuMCi4Ox5ub9iOcwv7dpG+M0F9CuWou6Pw+hdN5lRPeZEVq5iDTjTOFWp EgAw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020aa796a2000000b00625edf717besi15850911pfk.259.2023.04.12.00.07.32; Wed, 12 Apr 2023 00:07:47 -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 S229787AbjDLGqr (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762952748170892340?= X-GMAIL-MSGID: =?utf-8?q?1762953283649678030?= 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_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); 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); From patchwork Wed Apr 12 06:46:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 82283 Return-Path: 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 + 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 ); 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762952748170892340?= X-GMAIL-MSGID: =?utf-8?q?1762953650853365599?= 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_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);