From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"fshao@chromium.org" <fshao@chromium.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"kernel@collabora.com" <kernel@collabora.com>
Subject: Re: [PATCH v3 1/6] drm/mediatek: mtk_dpi: Simplify with devm_drm_bridge_add()
Date: Thu, 27 Jul 2023 03:11:23 +0000 [thread overview]
Message-ID: <ed59ff190c9a798d60068c4ac02abb429e9073b1.camel@mediatek.com> (raw)
In-Reply-To: <20230726082245.550929-2-angelogioacchino.delregno@collabora.com>
Hi, Angelo:
On Wed, 2023-07-26 at 10:22 +0200, AngeloGioacchino Del Regno wrote:
> Change drm_bridge_add() to its devm variant to slightly simplify the
> probe function.
Reviewed-by: CK Hu <ck.hu@mediatek.com>
>
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> Reviewed-by: Fei Shao <fshao@chromium.org>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
> b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 28bdb1f427ff..e4ee0d02893a 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -1089,11 +1089,12 @@ static int mtk_dpi_probe(struct
> platform_device *pdev)
> dpi->bridge.of_node = dev->of_node;
> dpi->bridge.type = DRM_MODE_CONNECTOR_DPI;
>
> - drm_bridge_add(&dpi->bridge);
> + ret = devm_drm_bridge_add(dev, &dpi->bridge);
> + if (ret)
> + return ret;
>
> ret = component_add(dev, &mtk_dpi_component_ops);
> if (ret) {
> - drm_bridge_remove(&dpi->bridge);
> dev_err(dev, "Failed to add component: %d\n", ret);
> return ret;
> }
> @@ -1103,10 +1104,7 @@ static int mtk_dpi_probe(struct
> platform_device *pdev)
>
> static int mtk_dpi_remove(struct platform_device *pdev)
> {
> - struct mtk_dpi *dpi = platform_get_drvdata(pdev);
> -
> component_del(&pdev->dev, &mtk_dpi_component_ops);
> - drm_bridge_remove(&dpi->bridge);
>
> return 0;
> }
next prev parent reply other threads:[~2023-07-27 3:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 8:22 [PATCH v3 0/6] drm/mediatek: Small mtk-dpi cleanups AngeloGioacchino Del Regno
2023-07-26 8:22 ` [PATCH v3 1/6] drm/mediatek: mtk_dpi: Simplify with devm_drm_bridge_add() AngeloGioacchino Del Regno
2023-07-27 3:11 ` CK Hu (胡俊光) [this message]
2023-07-26 8:22 ` [PATCH v3 2/6] drm/mediatek: mtk_dpi: Simplify with dev_err_probe() AngeloGioacchino Del Regno
2023-07-26 8:22 ` [PATCH v3 3/6] drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge() AngeloGioacchino Del Regno
2023-07-27 3:24 ` CK Hu (胡俊光)
2023-07-26 8:22 ` [PATCH v3 4/6] drm/mediatek: mtk_dpi: Switch to .remove_new() void callback AngeloGioacchino Del Regno
2023-07-26 8:22 ` [PATCH v3 5/6] drm/mediatek: mtk_dpi: Use devm_platform_ioremap_resource() AngeloGioacchino Del Regno
2023-07-26 8:22 ` [PATCH v3 6/6] drm/mediatek: mtk_dpi: Compress struct of_device_id entries AngeloGioacchino Del Regno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed59ff190c9a798d60068c4ac02abb429e9073b1.camel@mediatek.com \
--to=ck.hu@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=fshao@chromium.org \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®