Message ID | 20230719075056.72178-6-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2283592vqt; Wed, 19 Jul 2023 01:22:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlG+LY47XGDtXKv/v4H41UODRDqFMXbg/viIFWsyknDR/JfucKljDdQWFWRlsm5Yr4FMCq+L X-Received: by 2002:a17:906:53d6:b0:994:56d3:8a3d with SMTP id p22-20020a17090653d600b0099456d38a3dmr1735078ejo.17.1689754958946; Wed, 19 Jul 2023 01:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689754958; cv=none; d=google.com; s=arc-20160816; b=Afj5SIAxIf5bkoH7/kHbvQxrBHhI7JHtv94AhhniVxDpIARJ2UkMpZEzzhq2eL/NVs wxp4ONl/lMb9JmQynVP1tg3KVDdy1TmOgjfcS68GAd4H5vPgzesy75t2uo8qn4GNflJp KH2z1XW5Hy1aqkHCdWtV5MU8+wchFhraUJjmTb4WtitEF1vSbXwfkvr6usDjtCLE90m7 gK6K0ZdlJw2Vs1uG/mQR/pJUdnS+OkyGNSWILQo9e9jwRq5fFFB9x26LUiAVcSV9HG3q 3qaKIh4COuDqbbHjBm41CadMPnnSJIPdSQVCJ6sf/vZnzgWEYBX90cVTCWy4FWwA57Ct mLWQ== 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 :dkim-signature; bh=9A8cogseX/XHKwg6km5SEZXwcG9TMNwm3LxzDIr4lEA=; fh=NKnLsaTUs6DGQa/OThi18WPpEgJ637Y16FMWW8s0AeQ=; b=BWh+ZV3TZD12awBcbpYEymCTliHJo1Mtl6DWwTmQQwN6IWzcG+wF3RNIa48yEWBt7+ 1uFtpbzjuae2xHti692PVEgB8YBJNQM/GaRJOz/FQvF+0XVmsmV12tTxzp2WhL2IU9Vc slDWUcQ0IXGzhNZkDHHtszuP5gCTlmc8AUDF9/kobc20ZmoAgu7wpw2qsiTaLDbiX3Q5 g1bP0skV2l0EMIJDGID84urZTDSSCduxiBF9JVRmDDD3jYbMDDTi60eQGXYDMtuihUjt +eiMAP9fGlh1HSCKD4EgX03WjKBHW/rJAAlfwfEL25aY7FOIcDJM2Zkvx11b9IGf3LxT AEGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="C/tOVKwL"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lc1-20020a170906dfe100b009930c0374basi2525066ejc.632.2023.07.19.01.22.14; Wed, 19 Jul 2023 01:22:38 -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; dkim=pass header.i=@collabora.com header.s=mail header.b="C/tOVKwL"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbjGSHv3 (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Wed, 19 Jul 2023 03:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbjGSHvM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Jul 2023 03:51:12 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A5F134 for <linux-kernel@vger.kernel.org>; Wed, 19 Jul 2023 00:51:12 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id F063B660704A; Wed, 19 Jul 2023 08:51:09 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1689753070; bh=pH0eS322JL8A9XQUDj4YhAVk0Kl3Mp/XP1arLmFs7pg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C/tOVKwLVb7iMw6C/ZnKzmMECtfWtShZzz6LG2LIZ9x7CxakoAQLb+sQwYB1o2mYC C57V/Fq7TrgE7mZ0+XGT+oRM1DJS/UJKDOfyw6peF/PIF1f/1zfQsQjMFnU91XaruT Ge2/rx1bRHfY7YuGLeKI8E4tL4guS0+iNq8gZScOFQL0Wx95+vrcA6SjaWUJic/oBF qQYZRehZf9V76YKG+teySef8Imm5WIy9+TD0zt6iCcoKNMZ591qXe3OelZoCqsNzc3 4vlDIOF4IyYOBv6rYMKSTNGXr3JfutHrNDyKNWiS7BWB2DTLBlyr+QlG4ZAQZMGGiJ DNMXlA6ZXnvkg== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, 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, kernel@collabora.com, fshao@chromium.org Subject: [PATCH v2 5/6] drm/mediatek: mtk_dpi: Use devm_platform_ioremap_resource() Date: Wed, 19 Jul 2023 09:50:55 +0200 Message-Id: <20230719075056.72178-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230719075056.72178-1-angelogioacchino.delregno@collabora.com> References: <20230719075056.72178-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771836496118661328 X-GMAIL-MSGID: 1771836496118661328 |
Series |
drm/mediatek: Small mtk-dpi cleanups
|
|
Commit Message
AngeloGioacchino Del Regno
July 19, 2023, 7:50 a.m. UTC
Instead of the open-coded platform_get_resource, devm_ioremap_resource
switch to devm_platform_ioremap_resource(), also dropping the useless
struct resource pointer, which becomes unused.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On Wed, Jul 19, 2023 at 3:51 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > Instead of the open-coded platform_get_resource, devm_ioremap_resource > switch to devm_platform_ioremap_resource(), also dropping the useless > struct resource pointer, which becomes unused. > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Fei Shao <fshao@chromium.org>
Hi, Angelo: On Wed, 2023-07-19 at 09:50 +0200, AngeloGioacchino Del Regno wrote: > Instead of the open-coded platform_get_resource, > devm_ioremap_resource > switch to devm_platform_ioremap_resource(), also dropping the useless > struct resource pointer, which becomes unused. Reviewed-by: CK Hu <ck.hu@mediatek.com> > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c > b/drivers/gpu/drm/mediatek/mtk_dpi.c > index 3a140498c98a..244340df7468 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > @@ -1007,7 +1007,6 @@ static int mtk_dpi_probe(struct platform_device > *pdev) > { > struct device *dev = &pdev->dev; > struct mtk_dpi *dpi; > - struct resource *mem; > int ret; > > dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL); > @@ -1038,8 +1037,7 @@ static int mtk_dpi_probe(struct platform_device > *pdev) > dev_dbg(&pdev->dev, "Cannot find pinctrl > active!\n"); > } > } > - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - dpi->regs = devm_ioremap_resource(dev, mem); > + dpi->regs = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(dpi->regs)) > return dev_err_probe(dev, PTR_ERR(dpi->regs), > "Failed to ioremap mem > resource\n");
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 3a140498c98a..244340df7468 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1007,7 +1007,6 @@ static int mtk_dpi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_dpi *dpi; - struct resource *mem; int ret; dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL); @@ -1038,8 +1037,7 @@ static int mtk_dpi_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Cannot find pinctrl active!\n"); } } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dpi->regs = devm_ioremap_resource(dev, mem); + dpi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dpi->regs)) return dev_err_probe(dev, PTR_ERR(dpi->regs), "Failed to ioremap mem resource\n");