]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAP: DSS2: Clean up a switch-case
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 24 Feb 2011 11:59:13 +0000 (13:59 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 11 Mar 2011 13:46:24 +0000 (15:46 +0200)
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

index 22dd7a474f79bd8fae54987dd66f01ac554fb8e6..3f4fa0b08460edea3d4928af8b9200ee6f825c84 100644 (file)
@@ -393,29 +393,6 @@ void dss_init_device(struct platform_device *pdev,
        int i;
        int r;
 
-       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:
@@ -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) {