diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-05-23 05:07:50 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-05-23 05:54:21 -0400 |
commit | 591a0ac7f14aae6bf11b1cb6b5a68480bd644ddb (patch) | |
tree | cb2b4707ecd8aaac1eff6901b311d4f839c69383 /drivers/media/platform/omap | |
parent | b358c6cf029cb67b3ed9cc367fb46f1fa3228c5b (diff) |
OMAPDSS: Fix crash with DT boot
When booting with DT, there's a crash when omapfb is probed. This is
caused by the fact that omapdss+DT is not yet supported, and thus
omapdss is not probed at all. On the other hand, omapfb is always
probed. When omapfb tries to use omapdss, there's a NULL pointer
dereference crash. The same error should most likely happen with omapdrm
and omap_vout also.
To fix this, add an "initialized" state to omapdss. When omapdss has
been probed, it's marked as initialized. omapfb, omapdrm and omap_vout
check this state when they are probed to see that omapdss is actually
there.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'drivers/media/platform/omap')
-rw-r--r-- | drivers/media/platform/omap/omap_vout.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 96c4a17e4280..0a489bd29d6b 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -2144,6 +2144,9 @@ static int __init omap_vout_probe(struct platform_device *pdev) | |||
2144 | struct omap_dss_device *def_display; | 2144 | struct omap_dss_device *def_display; |
2145 | struct omap2video_device *vid_dev = NULL; | 2145 | struct omap2video_device *vid_dev = NULL; |
2146 | 2146 | ||
2147 | if (omapdss_is_initialized() == false) | ||
2148 | return -EPROBE_DEFER; | ||
2149 | |||
2147 | ret = omapdss_compat_init(); | 2150 | ret = omapdss_compat_init(); |
2148 | if (ret) { | 2151 | if (ret) { |
2149 | dev_err(&pdev->dev, "failed to init dss\n"); | 2152 | dev_err(&pdev->dev, "failed to init dss\n"); |