All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] OMAP: DSS2: Clean up a switch-case
@ 2011-02-24 13:34 Tomi Valkeinen
  2011-02-24 13:34 ` [PATCH 2/4] OMAP: DSS2: FEATURES: Remove SDI from 3630 displays Tomi Valkeinen
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tomi Valkeinen @ 2011-02-24 13:34 UTC (permalink / raw)
  To: linux-omap; +Cc: Tomi Valkeinen

Support for the display interface was checked in a separate switch-case.
There's no reason for that, and this patch handles the fail code path in
the same switch-case where the display initialization is done.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/display.c |   27 +++------------------------
 1 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 22dd7a4..3f4fa0b 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -396,29 +396,6 @@ void dss_init_device(struct platform_device *pdev,
 	switch (dssdev->type) {
 #ifdef CONFIG_OMAP2_DSS_DPI
 	case OMAP_DISPLAY_TYPE_DPI:
-#endif
-#ifdef CONFIG_OMAP2_DSS_RFBI
-	case OMAP_DISPLAY_TYPE_DBI:
-#endif
-#ifdef CONFIG_OMAP2_DSS_SDI
-	case OMAP_DISPLAY_TYPE_SDI:
-#endif
-#ifdef CONFIG_OMAP2_DSS_DSI
-	case OMAP_DISPLAY_TYPE_DSI:
-#endif
-#ifdef CONFIG_OMAP2_DSS_VENC
-	case OMAP_DISPLAY_TYPE_VENC:
-#endif
-		break;
-	default:
-		DSSERR("Support for display '%s' not compiled in.\n",
-				dssdev->name);
-		return;
-	}
-
-	switch (dssdev->type) {
-#ifdef CONFIG_OMAP2_DSS_DPI
-	case OMAP_DISPLAY_TYPE_DPI:
 		r = dpi_init_display(dssdev);
 		break;
 #endif
@@ -443,7 +420,9 @@ void dss_init_device(struct platform_device *pdev,
 		break;
 #endif
 	default:
-		BUG();
+		DSSERR("Support for display '%s' not compiled in.\n",
+				dssdev->name);
+		return;
 	}
 
 	if (r) {
-- 
1.7.1


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

end of thread, other threads:[~2011-03-01  8:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24 13:34 [PATCH 1/4] OMAP: DSS2: Clean up a switch-case Tomi Valkeinen
2011-02-24 13:34 ` [PATCH 2/4] OMAP: DSS2: FEATURES: Remove SDI from 3630 displays Tomi Valkeinen
2011-02-24 13:34 ` [PATCH 3/4] OMAP: DSS2: FEATURES: Remove DSI & SDI from OMAP2 Tomi Valkeinen
2011-02-25  5:06   ` archit taneja
2011-02-24 13:34 ` [PATCH 4/4] OMAP: DSS2: Check for SDI HW before accessing SDI registers Tomi Valkeinen
2011-03-01  6:49   ` archit taneja
2011-03-01  7:38     ` Tomi Valkeinen
2011-03-01  7:46       ` archit taneja
2011-03-01  8:00         ` Tomi Valkeinen
2011-03-01  8:32           ` archit taneja
2011-03-01  7:42     ` Tomi Valkeinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.