linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: nwl-dsi: Drop the drm_of_panel_bridge_remove() function call
@ 2022-04-01  1:58 Liu Ying
  2022-04-01 14:52 ` Jagan Teki
  0 siblings, 1 reply; 3+ messages in thread
From: Liu Ying @ 2022-04-01  1:58 UTC (permalink / raw)
  To: dri-devel, linux-kernel
  Cc: Robert Foss, Guido Günther, Jagan Teki, NXP Linux Team

Since this driver has been changed to use the resource managed
devm_drm_of_get_bridge() to get bridge from ->attach(), it's
unnecessary to call drm_of_panel_bridge_remove() to remove the
bridge from ->detach().  So, let's drop the drm_of_panel_bridge_remove()
function call.  As nwl_dsi_bridge_detach() only calls
drm_of_panel_bridge_remove(), it can also be dropped.

Cc: Robert Foss <robert.foss@linaro.org>
Cc: Guido Günther <agx@sigxcpu.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
---
 drivers/gpu/drm/bridge/nwl-dsi.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c
index a549da5b3f93..47859d4506b4 100644
--- a/drivers/gpu/drm/bridge/nwl-dsi.c
+++ b/drivers/gpu/drm/bridge/nwl-dsi.c
@@ -919,12 +919,6 @@ static int nwl_dsi_bridge_attach(struct drm_bridge *bridge,
 	return drm_bridge_attach(bridge->encoder, panel_bridge, bridge, flags);
 }
 
-static void nwl_dsi_bridge_detach(struct drm_bridge *bridge)
-{	struct nwl_dsi *dsi = bridge_to_dsi(bridge);
-
-	drm_of_panel_bridge_remove(dsi->dev->of_node, 1, 0);
-}
-
 static u32 *nwl_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
 						 struct drm_bridge_state *bridge_state,
 						 struct drm_crtc_state *crtc_state,
@@ -970,7 +964,6 @@ static const struct drm_bridge_funcs nwl_dsi_bridge_funcs = {
 	.mode_set		= nwl_dsi_bridge_mode_set,
 	.mode_valid		= nwl_dsi_bridge_mode_valid,
 	.attach			= nwl_dsi_bridge_attach,
-	.detach			= nwl_dsi_bridge_detach,
 };
 
 static int nwl_dsi_parse_dt(struct nwl_dsi *dsi)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/bridge: nwl-dsi: Drop the drm_of_panel_bridge_remove() function call
  2022-04-01  1:58 [PATCH] drm/bridge: nwl-dsi: Drop the drm_of_panel_bridge_remove() function call Liu Ying
@ 2022-04-01 14:52 ` Jagan Teki
  2022-04-04  9:26   ` Robert Foss
  0 siblings, 1 reply; 3+ messages in thread
From: Jagan Teki @ 2022-04-01 14:52 UTC (permalink / raw)
  To: Liu Ying
  Cc: dri-devel, linux-kernel, Robert Foss, Guido Günther, NXP Linux Team

On Fri, Apr 1, 2022 at 7:26 AM Liu Ying <victor.liu@nxp.com> wrote:
>
> Since this driver has been changed to use the resource managed
> devm_drm_of_get_bridge() to get bridge from ->attach(), it's
> unnecessary to call drm_of_panel_bridge_remove() to remove the
> bridge from ->detach().  So, let's drop the drm_of_panel_bridge_remove()
> function call.  As nwl_dsi_bridge_detach() only calls
> drm_of_panel_bridge_remove(), it can also be dropped.
>
> Cc: Robert Foss <robert.foss@linaro.org>
> Cc: Guido Günther <agx@sigxcpu.org>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Signed-off-by: Liu Ying <victor.liu@nxp.com>
> ---

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/bridge: nwl-dsi: Drop the drm_of_panel_bridge_remove() function call
  2022-04-01 14:52 ` Jagan Teki
@ 2022-04-04  9:26   ` Robert Foss
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Foss @ 2022-04-04  9:26 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Liu Ying, dri-devel, linux-kernel, Guido Günther, NXP Linux Team

On Fri, 1 Apr 2022 at 16:52, Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Fri, Apr 1, 2022 at 7:26 AM Liu Ying <victor.liu@nxp.com> wrote:
> >
> > Since this driver has been changed to use the resource managed
> > devm_drm_of_get_bridge() to get bridge from ->attach(), it's
> > unnecessary to call drm_of_panel_bridge_remove() to remove the
> > bridge from ->detach().  So, let's drop the drm_of_panel_bridge_remove()
> > function call.  As nwl_dsi_bridge_detach() only calls
> > drm_of_panel_bridge_remove(), it can also be dropped.
> >
> > Cc: Robert Foss <robert.foss@linaro.org>
> > Cc: Guido Günther <agx@sigxcpu.org>
> > Cc: Jagan Teki <jagan@amarulasolutions.com>
> > Cc: NXP Linux Team <linux-imx@nxp.com>
> > Signed-off-by: Liu Ying <victor.liu@nxp.com>
> > ---
>
> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to drm-misc-next.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-04  9:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01  1:58 [PATCH] drm/bridge: nwl-dsi: Drop the drm_of_panel_bridge_remove() function call Liu Ying
2022-04-01 14:52 ` Jagan Teki
2022-04-04  9:26   ` Robert Foss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).