diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.c | 3 | ||||
-rw-r--r-- | drivers/media/platform/omap/omap_vout.c | 3 | ||||
-rw-r--r-- | drivers/video/omap2/dss/core.c | 20 | ||||
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 3 | ||||
-rw-r--r-- | drivers/video/ps3fb.c | 2 |
5 files changed, 29 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 9c53c25e5201..826586ffbe83 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c | |||
@@ -649,6 +649,9 @@ static void pdev_shutdown(struct platform_device *device) | |||
649 | 649 | ||
650 | static int pdev_probe(struct platform_device *device) | 650 | static int pdev_probe(struct platform_device *device) |
651 | { | 651 | { |
652 | if (omapdss_is_initialized() == false) | ||
653 | return -EPROBE_DEFER; | ||
654 | |||
652 | DBG("%s", device->name); | 655 | DBG("%s", device->name); |
653 | return drm_platform_init(&omap_drm_driver, device); | 656 | return drm_platform_init(&omap_drm_driver, device); |
654 | } | 657 | } |
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 477268a2415f..d338b19da544 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -2150,6 +2150,9 @@ static int __init omap_vout_probe(struct platform_device *pdev) | |||
2150 | struct omap_dss_device *def_display; | 2150 | struct omap_dss_device *def_display; |
2151 | struct omap2video_device *vid_dev = NULL; | 2151 | struct omap2video_device *vid_dev = NULL; |
2152 | 2152 | ||
2153 | if (omapdss_is_initialized() == false) | ||
2154 | return -EPROBE_DEFER; | ||
2155 | |||
2153 | ret = omapdss_compat_init(); | 2156 | ret = omapdss_compat_init(); |
2154 | if (ret) { | 2157 | if (ret) { |
2155 | dev_err(&pdev->dev, "failed to init dss\n"); | 2158 | dev_err(&pdev->dev, "failed to init dss\n"); |
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 60cc6fee6548..c9c2252e3719 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c | |||
@@ -53,6 +53,8 @@ static char *def_disp_name; | |||
53 | module_param_named(def_disp, def_disp_name, charp, 0); | 53 | module_param_named(def_disp, def_disp_name, charp, 0); |
54 | MODULE_PARM_DESC(def_disp, "default display name"); | 54 | MODULE_PARM_DESC(def_disp, "default display name"); |
55 | 55 | ||
56 | static bool dss_initialized; | ||
57 | |||
56 | const char *omapdss_get_default_display_name(void) | 58 | const char *omapdss_get_default_display_name(void) |
57 | { | 59 | { |
58 | return core.default_display_name; | 60 | return core.default_display_name; |
@@ -66,6 +68,12 @@ enum omapdss_version omapdss_get_version(void) | |||
66 | } | 68 | } |
67 | EXPORT_SYMBOL(omapdss_get_version); | 69 | EXPORT_SYMBOL(omapdss_get_version); |
68 | 70 | ||
71 | bool omapdss_is_initialized(void) | ||
72 | { | ||
73 | return dss_initialized; | ||
74 | } | ||
75 | EXPORT_SYMBOL(omapdss_is_initialized); | ||
76 | |||
69 | struct platform_device *dss_get_core_pdev(void) | 77 | struct platform_device *dss_get_core_pdev(void) |
70 | { | 78 | { |
71 | return core.pdev; | 79 | return core.pdev; |
@@ -603,6 +611,8 @@ static int __init omap_dss_init(void) | |||
603 | return r; | 611 | return r; |
604 | } | 612 | } |
605 | 613 | ||
614 | dss_initialized = true; | ||
615 | |||
606 | return 0; | 616 | return 0; |
607 | } | 617 | } |
608 | 618 | ||
@@ -633,7 +643,15 @@ static int __init omap_dss_init(void) | |||
633 | 643 | ||
634 | static int __init omap_dss_init2(void) | 644 | static int __init omap_dss_init2(void) |
635 | { | 645 | { |
636 | return omap_dss_register_drivers(); | 646 | int r; |
647 | |||
648 | r = omap_dss_register_drivers(); | ||
649 | if (r) | ||
650 | return r; | ||
651 | |||
652 | dss_initialized = true; | ||
653 | |||
654 | return 0; | ||
637 | } | 655 | } |
638 | 656 | ||
639 | core_initcall(omap_dss_init); | 657 | core_initcall(omap_dss_init); |
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index c84bb8a4d0c4..856917b33616 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -2416,6 +2416,9 @@ static int omapfb_probe(struct platform_device *pdev) | |||
2416 | 2416 | ||
2417 | DBG("omapfb_probe\n"); | 2417 | DBG("omapfb_probe\n"); |
2418 | 2418 | ||
2419 | if (omapdss_is_initialized() == false) | ||
2420 | return -EPROBE_DEFER; | ||
2421 | |||
2419 | if (pdev->num_resources != 0) { | 2422 | if (pdev->num_resources != 0) { |
2420 | dev_err(&pdev->dev, "probed for an unknown device\n"); | 2423 | dev_err(&pdev->dev, "probed for an unknown device\n"); |
2421 | r = -ENODEV; | 2424 | r = -ENODEV; |
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index d9f08c653d62..dbfe2c18a434 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
@@ -710,7 +710,7 @@ static int ps3fb_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
710 | r = vm_iomap_memory(vma, info->fix.smem_start, info->fix.smem_len); | 710 | r = vm_iomap_memory(vma, info->fix.smem_start, info->fix.smem_len); |
711 | 711 | ||
712 | dev_dbg(info->device, "ps3fb: mmap framebuffer P(%lx)->V(%lx)\n", | 712 | dev_dbg(info->device, "ps3fb: mmap framebuffer P(%lx)->V(%lx)\n", |
713 | info->fix.smem_start + vma->vm_pgoff << PAGE_SHIFT, | 713 | info->fix.smem_start + (vma->vm_pgoff << PAGE_SHIFT), |
714 | vma->vm_start); | 714 | vma->vm_start); |
715 | 715 | ||
716 | return r; | 716 | return r; |