Commit 2436e8aa authored by Jean-Christophe PLAGNIOL-VILLARD's avatar Jean-Christophe PLAGNIOL-VILLARD

Merge branch 'fbdev-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux...

Merge branch 'fbdev-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux into linux-fbdev/for-3.10-fixes

Pull Tomi fixes for ps3fb and omap2
Signed-off-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
parents e4aa937e 591a0ac7
......@@ -649,6 +649,9 @@ static void pdev_shutdown(struct platform_device *device)
static int pdev_probe(struct platform_device *device)
{
if (omapdss_is_initialized() == false)
return -EPROBE_DEFER;
DBG("%s", device->name);
return drm_platform_init(&omap_drm_driver, device);
}
......
......@@ -2150,6 +2150,9 @@ static int __init omap_vout_probe(struct platform_device *pdev)
struct omap_dss_device *def_display;
struct omap2video_device *vid_dev = NULL;
if (omapdss_is_initialized() == false)
return -EPROBE_DEFER;
ret = omapdss_compat_init();
if (ret) {
dev_err(&pdev->dev, "failed to init dss\n");
......
......@@ -53,6 +53,8 @@ static char *def_disp_name;
module_param_named(def_disp, def_disp_name, charp, 0);
MODULE_PARM_DESC(def_disp, "default display name");
static bool dss_initialized;
const char *omapdss_get_default_display_name(void)
{
return core.default_display_name;
......@@ -66,6 +68,12 @@ enum omapdss_version omapdss_get_version(void)
}
EXPORT_SYMBOL(omapdss_get_version);
bool omapdss_is_initialized(void)
{
return dss_initialized;
}
EXPORT_SYMBOL(omapdss_is_initialized);
struct platform_device *dss_get_core_pdev(void)
{
return core.pdev;
......@@ -603,6 +611,8 @@ static int __init omap_dss_init(void)
return r;
}
dss_initialized = true;
return 0;
}
......@@ -633,7 +643,15 @@ static int __init omap_dss_init(void)
static int __init omap_dss_init2(void)
{
return omap_dss_register_drivers();
int r;
r = omap_dss_register_drivers();
if (r)
return r;
dss_initialized = true;
return 0;
}
core_initcall(omap_dss_init);
......
......@@ -2416,6 +2416,9 @@ static int omapfb_probe(struct platform_device *pdev)
DBG("omapfb_probe\n");
if (omapdss_is_initialized() == false)
return -EPROBE_DEFER;
if (pdev->num_resources != 0) {
dev_err(&pdev->dev, "probed for an unknown device\n");
r = -ENODEV;
......
......@@ -710,7 +710,7 @@ static int ps3fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
r = vm_iomap_memory(vma, info->fix.smem_start, info->fix.smem_len);
dev_dbg(info->device, "ps3fb: mmap framebuffer P(%lx)->V(%lx)\n",
info->fix.smem_start + vma->vm_pgoff << PAGE_SHIFT,
info->fix.smem_start + (vma->vm_pgoff << PAGE_SHIFT),
vma->vm_start);
return r;
......
......@@ -748,6 +748,7 @@ struct omap_dss_driver {
};
enum omapdss_version omapdss_get_version(void);
bool omapdss_is_initialized(void);
int omap_dss_register_driver(struct omap_dss_driver *);
void omap_dss_unregister_driver(struct omap_dss_driver *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment