[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef62141b4b9940d9642e1318763ea6c687deaa8d.camel@mediatek.com>
Date: Tue, 4 Jul 2023 06:28:29 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>,
"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"kernel@...labora.com" <kernel@...labora.com>
Subject: Re: [PATCH 1/3] drm/mediatek: Use
devm_platform_get_and_ioremap_resource()
Hi, Angelo:
On Thu, 2023-06-08 at 12:12 +0200, AngeloGioacchino Del Regno wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> Instead of open coding calls to platform_get_resource() followed by
> devm_ioremap_resource(), perform a single call to the helper
> devm_platform_get_and_ioremap_resource().
>
> This commit brings no functional changes.
>
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@...labora.com>
> ---
> drivers/gpu/drm/mediatek/mtk_cec.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_disp_aal.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_disp_color.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_disp_merge.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_dsi.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c | 3 +--
> drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 3 +--
> 12 files changed, 12 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c
> b/drivers/gpu/drm/mediatek/mtk_cec.c
> index b640bc0559e7..5136aada9023 100644
> --- a/drivers/gpu/drm/mediatek/mtk_cec.c
> +++ b/drivers/gpu/drm/mediatek/mtk_cec.c
> @@ -195,8 +195,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_get_and_ioremap_resource(pdev, 0,
> &res);
The 'res' is useless, so drop it.
Regards,
CK
> if (IS_ERR(cec->regs)) {
> ret = PTR_ERR(cec->regs);
> dev_err(dev, "Failed to ioremap cec: %d\n", ret);
>
Powered by blists - more mailing lists