Skip to contentSkip to conversation

drm/panel: p079zca: unconditionally remove the panel on removal

PATCH Applied Heiko Stuebner 3 participants 3 messages Aug 16, 2018 – Sep 27, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: p079zca: unconditionally remove the panel on removal

There is no need to check innolux->base.dev when trying to remove the panel, as that variable is always set directly before the panel gets added and will still be available on panel_remove.

---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-innolux-p079zca.c +1 -2
index 72edb334d997..ca4ae45dd307 100644
@@ -506,8 +506,7 @@ static int innolux_panel_add(struct mipi_dsi_device *dsi,
 
 static void innolux_panel_del(struct innolux_panel *innolux)
 {
-	if (innolux->base.dev)
-		drm_panel_remove(&innolux->base);
+	drm_panel_remove(&innolux->base);
 }
 
 static int innolux_panel_probe(struct mipi_dsi_device *dsi)
Signature · 6 lines
2.17.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Heiko Stuebner

There is no need to check innolux->base.dev when trying to remove the panel, as that variable is always set directly before the panel gets added and will still be available on panel_remove.

---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-innolux-p079zca.c +0 -0
index 72edb334d997..ca4ae45dd307 100644

drivers/gpu/drm/panel/panel-innolux-p079zca.c static int innolux_panel_add(struct mipi_dsi_device *dsi, · line 512

Quoted 9 lines
drivers/gpu/drm/panel/panel-innolux-p079zca.c +1 -2
@@ -506,8 +506,7 @@ static int innolux_panel_add(struct mipi_dsi_device *dsi,
 
 static void innolux_panel_del(struct innolux_panel *innolux)
 {
-	if (innolux->base.dev)
-		drm_panel_remove(&innolux->base);
+	drm_panel_remove(&innolux->base);
 }
 
 static int innolux_panel_probe(struct mipi_dsi_device *dsi)

regards
Philipp
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to Heiko Stuebner
Quoted 8 lines · Heiko Stuebner

There is no need to check innolux->base.dev when trying to remove the panel, as that variable is always set directly before the panel gets added and will still be available on panel_remove.

---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

Thierry