Subject: [PATCH v2 4/6] drm/mediatek: mtk_dpi: Switch to .remove_new() void callback

The .remove() callback cannot fail: switch to .remove_new() and
change mtk_dpi_remove() to void.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index e9c5a0f44537..3a140498c98a 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -1087,11 +1087,9 @@ static int mtk_dpi_probe(struct platform_device *pdev)
return 0;
}

-static int mtk_dpi_remove(struct platform_device *pdev)
+static void mtk_dpi_remove(struct platform_device *pdev)
{
component_del(&pdev->dev, &mtk_dpi_component_ops);
-
- return 0;
}

static const struct of_device_id mtk_dpi_of_ids[] = {
@@ -1122,7 +1120,7 @@ MODULE_DEVICE_TABLE(of, mtk_dpi_of_ids);

struct platform_driver mtk_dpi_driver = {
.probe = mtk_dpi_probe,
- .remove = mtk_dpi_remove,
+ .remove_new = mtk_dpi_remove,
.driver = {
.name = "mediatek-dpi",
.of_match_table = mtk_dpi_of_ids,
--
2.40.1



2023-07-19 10:58:12

by Fei Shao

[permalink] [raw]
Subject: Re: [PATCH v2 4/6] drm/mediatek: mtk_dpi: Switch to .remove_new() void callback

On Wed, Jul 19, 2023 at 3:51 PM AngeloGioacchino Del Regno
<[email protected]> wrote:
>
> The .remove() callback cannot fail: switch to .remove_new() and
> change mtk_dpi_remove() to void.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Reviewed-by: Fei Shao <[email protected]>

2023-07-26 06:29:43

by CK Hu (胡俊光)

[permalink] [raw]
Subject: Re: [PATCH v2 4/6] drm/mediatek: mtk_dpi: Switch to .remove_new() void callback

Hi, Angelo:

On Wed, 2023-07-19 at 09:50 +0200, AngeloGioacchino Del Regno wrote:
> The .remove() callback cannot fail: switch to .remove_new() and
> change mtk_dpi_remove() to void.

Reviewed-by: CK Hu <[email protected]>

>
> Signed-off-by: AngeloGioacchino Del Regno <
> [email protected]>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
> b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index e9c5a0f44537..3a140498c98a 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -1087,11 +1087,9 @@ static int mtk_dpi_probe(struct
> platform_device *pdev)
> return 0;
> }
>
> -static int mtk_dpi_remove(struct platform_device *pdev)
> +static void mtk_dpi_remove(struct platform_device *pdev)
> {
> component_del(&pdev->dev, &mtk_dpi_component_ops);
> -
> - return 0;
> }
>
> static const struct of_device_id mtk_dpi_of_ids[] = {
> @@ -1122,7 +1120,7 @@ MODULE_DEVICE_TABLE(of, mtk_dpi_of_ids);
>
> struct platform_driver mtk_dpi_driver = {
> .probe = mtk_dpi_probe,
> - .remove = mtk_dpi_remove,
> + .remove_new = mtk_dpi_remove,
> .driver = {
> .name = "mediatek-dpi",
> .of_match_table = mtk_dpi_of_ids,