Skip to contentSkip to conversation

drm/bridge: nwl-dsi: Drop the drm_of_panel_bridge_remove() function call

PATCH Applied Liu Ying 3 participants 3 messages Apr 1, 2022 – Apr 4, 2022

Subsystems (3)
lore
Share & tools
lore

Liu Ying

author
#0 lore raw

PATCH 1/1 drm/bridge: nwl-dsi: Drop the drm_of_panel_bridge_remove() function call

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 <[email protected]>
Cc Guido Günther <[email protected]>
Cc Jagan Teki <[email protected]>
Cc NXP Linux Team <[email protected]>
---
 drivers/gpu/drm/bridge/nwl-dsi.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/gpu/drm/bridge/nwl-dsi.c +0 -7
index a549da5b3f93..47859d4506b4 100644
@@ -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)
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Liu Ying

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.

Quoted 6 lines
Cc Robert Foss <[email protected]>
Cc Guido Günther <[email protected]>
Cc Jagan Teki <[email protected]>
Cc NXP Linux Team <[email protected]>

---

Applied
#2 lore raw
Quoted 10 lines · Jagan Teki
Quoted 8 lines · Liu Ying

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.

Quoted 8 lines
Quoted 6 lines
Cc Robert Foss <[email protected]>
Cc Guido Günther <[email protected]>
Cc Jagan Teki <[email protected]>
Cc NXP Linux Team <[email protected]>

---

Applied to drm-misc-next.