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 v2 1/6] drm/mediatek: mtk_dpi: Simplify with devm_drm_bridge_add()
Date: Wed, 26 Jul 2023 05:21:09 +0000 [thread overview]
Message-ID: <dde9d51db2c496fcddfb4161465851b6dff8e62e.camel@mediatek.com> (raw)
In-Reply-To: <20230719075056.72178-2-angelogioacchino.delregno@collabora.com>
Hi, Angelo:
On Wed, 2023-07-19 at 09:50 +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>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
> b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 948a53f1f4b3..74068aa70e0c 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -1090,11 +1090,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;
> }
> @@ -1107,7 +1108,6 @@ 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-26 5:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 7:50 [PATCH v2 0/6] drm/mediatek: Small mtk-dpi cleanups AngeloGioacchino Del Regno
2023-07-19 7:50 ` [PATCH v2 1/6] drm/mediatek: mtk_dpi: Simplify with devm_drm_bridge_add() AngeloGioacchino Del Regno
2023-07-19 10:22 ` Fei Shao
2023-07-26 5:21 ` CK Hu (胡俊光) [this message]
2023-07-26 5:31 ` CK Hu (胡俊光)
2023-07-19 7:50 ` [PATCH v2 2/6] drm/mediatek: mtk_dpi: Simplify with dev_err_probe() AngeloGioacchino Del Regno
2023-07-26 5:26 ` CK Hu (胡俊光)
2023-07-19 7:50 ` [PATCH v2 3/6] drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge() AngeloGioacchino Del Regno
2023-07-26 5:41 ` CK Hu (胡俊光)
2023-07-19 7:50 ` [PATCH v2 4/6] drm/mediatek: mtk_dpi: Switch to .remove_new() void callback AngeloGioacchino Del Regno
2023-07-19 10:24 ` Fei Shao
2023-07-26 5:45 ` CK Hu (胡俊光)
2023-07-19 7:50 ` [PATCH v2 5/6] drm/mediatek: mtk_dpi: Use devm_platform_ioremap_resource() AngeloGioacchino Del Regno
2023-07-19 10:25 ` Fei Shao
2023-07-26 5:55 ` CK Hu (胡俊光)
2023-07-19 7:50 ` [PATCH v2 6/6] drm/mediatek: mtk_dpi: Compress struct of_device_id entries AngeloGioacchino Del Regno
2023-07-19 10:26 ` Fei Shao
2023-07-26 6:02 ` CK Hu (胡俊光)
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=dde9d51db2c496fcddfb4161465851b6dff8e62e.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®