OMAPDSS: use omapdss_compat_init() in other drivers
omapdss_compat_init() and omapdss_compat_uninit() is called internally by omapdss. This patch moves the calls to omapfb, omap_vout and omapdrm drivers. omapdrm driver can later remove the call after non-compat support has been implemented in omapdrm. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Родитель
348be69d30
Коммит
a9ee9f08b6
|
@ -2184,14 +2184,23 @@ static int __init omap_vout_probe(struct platform_device *pdev)
|
|||
struct omap_dss_device *def_display;
|
||||
struct omap2video_device *vid_dev = NULL;
|
||||
|
||||
ret = omapdss_compat_init();
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to init dss\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (pdev->num_resources == 0) {
|
||||
dev_err(&pdev->dev, "probed for an unknown device\n");
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto err_dss_init;
|
||||
}
|
||||
|
||||
vid_dev = kzalloc(sizeof(struct omap2video_device), GFP_KERNEL);
|
||||
if (vid_dev == NULL)
|
||||
return -ENOMEM;
|
||||
if (vid_dev == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto err_dss_init;
|
||||
}
|
||||
|
||||
vid_dev->num_displays = 0;
|
||||
for_each_dss_dev(dssdev) {
|
||||
|
@ -2286,6 +2295,8 @@ probe_err1:
|
|||
}
|
||||
probe_err0:
|
||||
kfree(vid_dev);
|
||||
err_dss_init:
|
||||
omapdss_compat_uninit();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -572,6 +572,14 @@ static int dev_load(struct drm_device *dev, unsigned long flags)
|
|||
|
||||
dev->dev_private = priv;
|
||||
|
||||
ret = omapdss_compat_init();
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "coult not init omapdss\n");
|
||||
dev->dev_private = NULL;
|
||||
kfree(priv);
|
||||
return ret;
|
||||
}
|
||||
|
||||
priv->wq = alloc_ordered_workqueue("omapdrm", 0);
|
||||
|
||||
INIT_LIST_HEAD(&priv->obj_list);
|
||||
|
@ -583,6 +591,7 @@ static int dev_load(struct drm_device *dev, unsigned long flags)
|
|||
dev_err(dev->dev, "omap_modeset_init failed: ret=%d\n", ret);
|
||||
dev->dev_private = NULL;
|
||||
kfree(priv);
|
||||
omapdss_compat_uninit();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -618,6 +627,8 @@ static int dev_unload(struct drm_device *dev)
|
|||
flush_workqueue(priv->wq);
|
||||
destroy_workqueue(priv->wq);
|
||||
|
||||
omapdss_compat_uninit();
|
||||
|
||||
kfree(dev->dev_private);
|
||||
dev->dev_private = NULL;
|
||||
|
||||
|
|
|
@ -232,8 +232,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
|
|||
|
||||
dss_features_init(omapdss_get_version());
|
||||
|
||||
omapdss_compat_init();
|
||||
|
||||
r = dss_initialize_debugfs();
|
||||
if (r)
|
||||
goto err_debugfs;
|
||||
|
@ -258,8 +256,6 @@ static int omap_dss_remove(struct platform_device *pdev)
|
|||
|
||||
dss_uninitialize_debugfs();
|
||||
|
||||
omapdss_compat_uninit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2425,6 +2425,9 @@ static int __init omapfb_probe(struct platform_device *pdev)
|
|||
"ignoring the module parameter vrfb=y\n");
|
||||
}
|
||||
|
||||
r = omapdss_compat_init();
|
||||
if (r)
|
||||
goto err0;
|
||||
|
||||
mutex_init(&fbdev->mtx);
|
||||
|
||||
|
@ -2544,6 +2547,7 @@ static int __init omapfb_probe(struct platform_device *pdev)
|
|||
|
||||
cleanup:
|
||||
omapfb_free_resources(fbdev);
|
||||
omapdss_compat_uninit();
|
||||
err0:
|
||||
dev_err(&pdev->dev, "failed to setup omapfb\n");
|
||||
return r;
|
||||
|
@ -2559,6 +2563,8 @@ static int __exit omapfb_remove(struct platform_device *pdev)
|
|||
|
||||
omapfb_free_resources(fbdev);
|
||||
|
||||
omapdss_compat_uninit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче