[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YGpfMa2HW2vLDfh5@pendragon.ideasonboard.com>
Date: Mon, 5 Apr 2021 03:52:01 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Douglas Anderson <dianders@...omium.org>
Cc: Andrzej Hajda <a.hajda@...sung.com>,
Neil Armstrong <narmstrong@...libre.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...l.net>,
Sam Ravnborg <sam@...nborg.org>,
Linus W <linus.walleij@...aro.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
robdclark@...omium.org, Stephen Boyd <swboyd@...omium.org>,
Steev Klimaszewski <steev@...i.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
linux-arm-msm@...r.kernel.org,
Stanislav Lisovskiy <stanislav.lisovskiy@...el.com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Robert Foss <robert.foss@...aro.org>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 04/12] drm/bridge: ti-sn65dsi86: Reorder remove()
Hi Doug,
Thank you for the patch.
On Fri, Apr 02, 2021 at 03:28:38PM -0700, Douglas Anderson wrote:
> Let's make the remove() function strictly the reverse of the probe()
> function so it's easier to reason about.
>
> This patch was created by code inspection and should move us closer to
> a proper remove.
>
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> Reviewed-by: Andrzej Hajda <a.hajda@...sung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> ---
>
> Changes in v3:
> - Removed "NOTES" from commit message.
>
> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index 76f43af6735d..c006678c9921 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -1315,20 +1315,21 @@ static int ti_sn_bridge_remove(struct i2c_client *client)
> if (!pdata)
> return -EINVAL;
>
> - kfree(pdata->edid);
> - ti_sn_debugfs_remove(pdata);
> -
> - of_node_put(pdata->host_node);
> -
> - pm_runtime_disable(pdata->dev);
> -
> if (pdata->dsi) {
> mipi_dsi_detach(pdata->dsi);
> mipi_dsi_device_unregister(pdata->dsi);
> }
>
> + kfree(pdata->edid);
> +
> + ti_sn_debugfs_remove(pdata);
> +
> drm_bridge_remove(&pdata->bridge);
>
> + pm_runtime_disable(pdata->dev);
> +
> + of_node_put(pdata->host_node);
> +
> return 0;
> }
>
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists