summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/drm.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2013-09-16 12:48:29 +0530
committerTony Lindgren <tony@atomide.com>2013-10-08 14:02:35 -0700
commit7a59743d0ccbeade0cb130f9ceabbe51cb6d3eb7 (patch)
tree96c139fe65c3be5893250790b9f6335dda3b8db9 /arch/arm/mach-omap2/drm.c
parent7dfebabd4852b08ec0093d6f78aba7bc1b100318 (diff)
ARM: OMAP2+: display: Create omapdrm device inside omap_display_init
Move omapdrm device creation inside the omap_display_init so that we can correctly create the device based on the presence of omapdss within the platform. For example, on a kernel image supporting multiple platforms, omap_init_drm will create a omapdrm platform device on a AM33xx platform even though it doesn't have a DSS block. Originally worked on by Andy Gross. Cc: Andy Gross <andygro@gmail.com> Signed-off-by: Archit Taneja <archit@ti.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/drm.c')
-rw-r--r--arch/arm/mach-omap2/drm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c
index e6c38cd9893..facd7406a03 100644
--- a/arch/arm/mach-omap2/drm.c
+++ b/arch/arm/mach-omap2/drm.c
@@ -26,8 +26,9 @@
#include <linux/platform_data/omap_drm.h>
#include "soc.h"
+#include "display.h"
-#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE)
+#if defined(CONFIG_DRM_OMAP) || defined(CONFIG_DRM_OMAP_MODULE)
static struct omap_drm_platform_data platform_data;
@@ -40,14 +41,13 @@ static struct platform_device omap_drm_device = {
.id = 0,
};
-static int __init omap_init_drm(void)
+int __init omap_init_drm(void)
{
platform_data.omaprev = GET_OMAP_TYPE;
return platform_device_register(&omap_drm_device);
}
-
-omap_arch_initcall(omap_init_drm);
-
+#else
+int __init omap_init_drm(void) { return 0; }
#endif