Skip to contentSkip to conversation

drm: bridge: nwl-dsi: Drop panel_bridge from nwl_dsi

PATCH Applied Jagan Teki 2 participants 2 messages Jan 10, 2022 – Jan 12, 2022

Subsystems (3)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v2 1/1 drm: bridge: nwl-dsi: Drop panel_bridge from nwl_dsi

panel_bridge pointer never used anywhere except the one it looked up at nwl_dsi_bridge_attach.

Drop it from the nwl_dsi structure.

---
Changes for v2:
- collect Guido r-b

Note: This is patch is part of switching of devm_drm_of_get_bridge serious however the child node support of devm_drm_of_get_bridge is still under-review. So send it separatly as it not related to that API switch.
https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/

 drivers/gpu/drm/bridge/nwl-dsi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/bridge/nwl-dsi.c +2 -5
index fc3ad9fab867..9282e61dfbf0 100644
@@ -65,7 +65,6 @@ struct nwl_dsi_transfer {
 struct nwl_dsi {
 	struct drm_bridge bridge;
 	struct mipi_dsi_host dsi_host;
-	struct drm_bridge *panel_bridge;
 	struct device *dev;
 	struct phy *phy;
 	union phy_configure_opts phy_cfg;
@@ -924,13 +923,11 @@ static int nwl_dsi_bridge_attach(struct drm_bridge *bridge,
 		if (IS_ERR(panel_bridge))
 			return PTR_ERR(panel_bridge);
 	}
-	dsi->panel_bridge = panel_bridge;
 
-	if (!dsi->panel_bridge)
+	if (!panel_bridge)
 		return -EPROBE_DEFER;
 
-	return drm_bridge_attach(bridge->encoder, dsi->panel_bridge, bridge,
-				 flags);
+	return drm_bridge_attach(bridge->encoder, panel_bridge, bridge, flags);
 }
 
 static void nwl_dsi_bridge_detach(struct drm_bridge *bridge)
Signature · 1 line
2.25.1
Applied
#1 lore raw
Quoted 39 lines · Jagan Teki

panel_bridge pointer never used anywhere except the one it looked up at nwl_dsi_bridge_attach.

Drop it from the nwl_dsi structure.

---
Changes for v2:
- collect Guido r-b

Note: This is patch is part of switching of devm_drm_of_get_bridge serious however the child node support of devm_drm_of_get_bridge is still under-review. So send it separatly as it not related to that API switch.
https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/

 drivers/gpu/drm/bridge/nwl-dsi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/bridge/nwl-dsi.c +0 -2
index fc3ad9fab867..9282e61dfbf0 100644
@@ -65,7 +65,6 @@ struct nwl_dsi_transfer {
 struct nwl_dsi {
        struct drm_bridge bridge;
        struct mipi_dsi_host dsi_host;
-       struct drm_bridge *panel_bridge;
        struct device *dev;
        struct phy *phy;
        union phy_configure_opts phy_cfg;
@@ -924,13 +923,11 @@ static int nwl_dsi_bridge_attach(struct drm_bridge *bridge,
                if (IS_ERR(panel_bridge))
                        return PTR_ERR(panel_bridge);
        }
-       dsi->panel_bridge = panel_bridge;
 

drivers/gpu/drm/bridge/nwl-dsi.c static int nwl_dsi_bridge_attach(struct drm_bridge *bridge, · line 933

Quoted 10 lines
drivers/gpu/drm/bridge/nwl-dsi.c +2 -3
-       if (!dsi->panel_bridge)
+       if (!panel_bridge)
                return -EPROBE_DEFER;
 
-       return drm_bridge_attach(bridge->encoder, dsi->panel_bridge, bridge,
-                                flags);
+       return drm_bridge_attach(bridge->encoder, panel_bridge, bridge, flags);
 }
 
 static void nwl_dsi_bridge_detach(struct drm_bridge *bridge)

Applied to drm-misc-next.