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);