diff options
-rw-r--r-- | drivers/media/platform/omap/omap_vout.c | 17 | ||||
-rw-r--r-- | drivers/staging/omapdrm/omap_drv.c | 11 | ||||
-rw-r--r-- | drivers/video/omap2/dss/core.c | 4 | ||||
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 6 |
4 files changed, 31 insertions, 7 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index a2cc634eb42e..e8cac9e55bc9 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -2184,14 +2184,23 @@ static int __init omap_vout_probe(struct platform_device *pdev) | |||
2184 | struct omap_dss_device *def_display; | 2184 | struct omap_dss_device *def_display; |
2185 | struct omap2video_device *vid_dev = NULL; | 2185 | struct omap2video_device *vid_dev = NULL; |
2186 | 2186 | ||
2187 | ret = omapdss_compat_init(); | ||
2188 | if (ret) { | ||
2189 | dev_err(&pdev->dev, "failed to init dss\n"); | ||
2190 | return ret; | ||
2191 | } | ||
2192 | |||
2187 | if (pdev->num_resources == 0) { | 2193 | if (pdev->num_resources == 0) { |
2188 | dev_err(&pdev->dev, "probed for an unknown device\n"); | 2194 | dev_err(&pdev->dev, "probed for an unknown device\n"); |
2189 | return -ENODEV; | 2195 | ret = -ENODEV; |
2196 | goto err_dss_init; | ||
2190 | } | 2197 | } |
2191 | 2198 | ||
2192 | vid_dev = kzalloc(sizeof(struct omap2video_device), GFP_KERNEL); | 2199 | vid_dev = kzalloc(sizeof(struct omap2video_device), GFP_KERNEL); |
2193 | if (vid_dev == NULL) | 2200 | if (vid_dev == NULL) { |
2194 | return -ENOMEM; | 2201 | ret = -ENOMEM; |
2202 | goto err_dss_init; | ||
2203 | } | ||
2195 | 2204 | ||
2196 | vid_dev->num_displays = 0; | 2205 | vid_dev->num_displays = 0; |
2197 | for_each_dss_dev(dssdev) { | 2206 | for_each_dss_dev(dssdev) { |
@@ -2286,6 +2295,8 @@ probe_err1: | |||
2286 | } | 2295 | } |
2287 | probe_err0: | 2296 | probe_err0: |
2288 | kfree(vid_dev); | 2297 | kfree(vid_dev); |
2298 | err_dss_init: | ||
2299 | omapdss_compat_uninit(); | ||
2289 | return ret; | 2300 | return ret; |
2290 | } | 2301 | } |
2291 | 2302 | ||
diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c index ebdb0b676737..2bf72591817a 100644 --- a/drivers/staging/omapdrm/omap_drv.c +++ b/drivers/staging/omapdrm/omap_drv.c | |||
@@ -572,6 +572,14 @@ static int dev_load(struct drm_device *dev, unsigned long flags) | |||
572 | 572 | ||
573 | dev->dev_private = priv; | 573 | dev->dev_private = priv; |
574 | 574 | ||
575 | ret = omapdss_compat_init(); | ||
576 | if (ret) { | ||
577 | dev_err(dev->dev, "coult not init omapdss\n"); | ||
578 | dev->dev_private = NULL; | ||
579 | kfree(priv); | ||
580 | return ret; | ||
581 | } | ||
582 | |||
575 | priv->wq = alloc_ordered_workqueue("omapdrm", 0); | 583 | priv->wq = alloc_ordered_workqueue("omapdrm", 0); |
576 | 584 | ||
577 | INIT_LIST_HEAD(&priv->obj_list); | 585 | INIT_LIST_HEAD(&priv->obj_list); |
@@ -583,6 +591,7 @@ static int dev_load(struct drm_device *dev, unsigned long flags) | |||
583 | dev_err(dev->dev, "omap_modeset_init failed: ret=%d\n", ret); | 591 | dev_err(dev->dev, "omap_modeset_init failed: ret=%d\n", ret); |
584 | dev->dev_private = NULL; | 592 | dev->dev_private = NULL; |
585 | kfree(priv); | 593 | kfree(priv); |
594 | omapdss_compat_uninit(); | ||
586 | return ret; | 595 | return ret; |
587 | } | 596 | } |
588 | 597 | ||
@@ -618,6 +627,8 @@ static int dev_unload(struct drm_device *dev) | |||
618 | flush_workqueue(priv->wq); | 627 | flush_workqueue(priv->wq); |
619 | destroy_workqueue(priv->wq); | 628 | destroy_workqueue(priv->wq); |
620 | 629 | ||
630 | omapdss_compat_uninit(); | ||
631 | |||
621 | kfree(dev->dev_private); | 632 | kfree(dev->dev_private); |
622 | dev->dev_private = NULL; | 633 | dev->dev_private = NULL; |
623 | 634 | ||
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 50817fe18cf7..f8779d4750ba 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c | |||
@@ -232,8 +232,6 @@ static int __init omap_dss_probe(struct platform_device *pdev) | |||
232 | 232 | ||
233 | dss_features_init(omapdss_get_version()); | 233 | dss_features_init(omapdss_get_version()); |
234 | 234 | ||
235 | omapdss_compat_init(); | ||
236 | |||
237 | r = dss_initialize_debugfs(); | 235 | r = dss_initialize_debugfs(); |
238 | if (r) | 236 | if (r) |
239 | goto err_debugfs; | 237 | goto err_debugfs; |
@@ -258,8 +256,6 @@ static int omap_dss_remove(struct platform_device *pdev) | |||
258 | 256 | ||
259 | dss_uninitialize_debugfs(); | 257 | dss_uninitialize_debugfs(); |
260 | 258 | ||
261 | omapdss_compat_uninit(); | ||
262 | |||
263 | return 0; | 259 | return 0; |
264 | } | 260 | } |
265 | 261 | ||
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 1f60741a7886..4fa9487a8720 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -2425,6 +2425,9 @@ static int __init omapfb_probe(struct platform_device *pdev) | |||
2425 | "ignoring the module parameter vrfb=y\n"); | 2425 | "ignoring the module parameter vrfb=y\n"); |
2426 | } | 2426 | } |
2427 | 2427 | ||
2428 | r = omapdss_compat_init(); | ||
2429 | if (r) | ||
2430 | goto err0; | ||
2428 | 2431 | ||
2429 | mutex_init(&fbdev->mtx); | 2432 | mutex_init(&fbdev->mtx); |
2430 | 2433 | ||
@@ -2544,6 +2547,7 @@ static int __init omapfb_probe(struct platform_device *pdev) | |||
2544 | 2547 | ||
2545 | cleanup: | 2548 | cleanup: |
2546 | omapfb_free_resources(fbdev); | 2549 | omapfb_free_resources(fbdev); |
2550 | omapdss_compat_uninit(); | ||
2547 | err0: | 2551 | err0: |
2548 | dev_err(&pdev->dev, "failed to setup omapfb\n"); | 2552 | dev_err(&pdev->dev, "failed to setup omapfb\n"); |
2549 | return r; | 2553 | return r; |
@@ -2559,6 +2563,8 @@ static int __exit omapfb_remove(struct platform_device *pdev) | |||
2559 | 2563 | ||
2560 | omapfb_free_resources(fbdev); | 2564 | omapfb_free_resources(fbdev); |
2561 | 2565 | ||
2566 | omapdss_compat_uninit(); | ||
2567 | |||
2562 | return 0; | 2568 | return 0; |
2563 | } | 2569 | } |
2564 | 2570 | ||